summaryrefslogtreecommitdiff
path: root/include/git2/oid.h
diff options
context:
space:
mode:
authorMarc Pegon <pegon.marc@gmail.com>2011-05-28 21:24:25 +0200
committerVicent Marti <tanoku@gmail.com>2011-06-01 23:40:41 +0200
commitac2b94ad7658b53035b8518842348a083decd418 (patch)
tree19c5220d8493f697a4f09557ca4dfafb6cc12b36 /include/git2/oid.h
parentdd453c4dbf9a1fa38530b1f51e079852736b8f66 (diff)
downloadlibgit2-ac2b94ad7658b53035b8518842348a083decd418.tar.gz
Added a GIT_OID_MINPREFIXLEN constant to define the minimum length allowed for oid prefixes (set to 4, like in git). Consequently updated some object lookup methods and their documentation.
Diffstat (limited to 'include/git2/oid.h')
-rw-r--r--include/git2/oid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/git2/oid.h b/include/git2/oid.h
index e8803ced8..062b9ca8b 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -43,6 +43,10 @@ GIT_BEGIN_DECL
/** Size (in bytes) of a hex formatted oid */
#define GIT_OID_HEXSZ (GIT_OID_RAWSZ * 2)
+/** Minimum length (in number of hex characters,
+ * i.e. packets of 4 bits) of an oid prefix */
+#define GIT_OID_MINPREFIXLEN 4
+
/** Unique identity of any object (commit, tree, blob, tag). */
typedef struct {
/** raw binary formatted id */