Commit c43601160b6ecc66db4a26c784bbe62624305474

Edward Thomson 2021-12-12T09:56:28

oid: include maximum oid raw/hex sizes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/include/git2/oid.h b/include/git2/oid.h
index 8f92e75..db433a0 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -26,9 +26,11 @@ typedef enum {
 
 /** Size (in bytes) of a raw/binary oid */
 #define GIT_OID_SHA1_SIZE 20
+#define GIT_OID_MAX_SIZE  GIT_OID_SHA1_SIZE
 
 /** Size (in bytes) of a hex formatted oid */
 #define GIT_OID_SHA1_HEXSIZE (GIT_OID_SHA1_SIZE * 2)
+#define GIT_OID_MAX_HEXSIZE   GIT_OID_SHA1_HEXSIZE
 
 /** Minimum length (in number of hex characters,
  * i.e. packets of 4 bits) of an oid prefix */