Skip to content

Commit 1479806

Browse files
committed
oid: specify a default implementation
libgit2's current default oid type is SHA1, set a public macro for that.
1 parent 8173241 commit 1479806

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/git2/oid.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ typedef enum {
2525
GIT_OID_SHA256 = 2 /**< SHA256 */
2626
} git_oid_t;
2727

28+
/** SHA1 is currently libgit2's default oid type. */
29+
#define GIT_OID_DEFAULT GIT_OID_SHA1
30+
2831
/** Size (in bytes) of a raw/binary oid */
2932
#define GIT_OID_SHA1_SIZE 20
3033
#define GIT_OID_SHA256_SIZE 32

0 commit comments

Comments
 (0)