Commit 14798060a639924c7cd9cae3234abfe2d5327aff

Edward Thomson 2022-01-26T13:10:36

oid: specify a default implementation libgit2's current default oid type is SHA1, set a public macro for that.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/include/git2/oid.h b/include/git2/oid.h
index 924c680..6136e28 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -25,6 +25,9 @@ typedef enum {
 	GIT_OID_SHA256 = 2 /**< SHA256 */
 } git_oid_t;
 
+/** SHA1 is currently libgit2's default oid type. */
+#define GIT_OID_DEFAULT         GIT_OID_SHA1
+
 /** Size (in bytes) of a raw/binary oid */
 #define GIT_OID_SHA1_SIZE       20
 #define GIT_OID_SHA256_SIZE     32