Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/oid.h
diff options
context:
space:
mode:
authorMarc Pegon <pegon.marc@gmail.com>2011-05-29 13:45:34 +0400
committerVicent Marti <tanoku@gmail.com>2011-06-02 01:40:42 +0400
commitda03c9f35b282e70f0cb7e6ae1638df476c4e0df (patch)
tree5a053b89ce5c2acf97eaca1efc4b19a64e705beb /src/oid.h
parentac2b94ad7658b53035b8518842348a083decd418 (diff)
Changed return value of git_oid_match to be consistent with the other compare methods (0 means oids match). Added method to compare prefixes of hex formatted oids.
Diffstat (limited to 'src/oid.h')
-rw-r--r--src/oid.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/oid.h b/src/oid.h
index 79f5b6507..1cd2450d6 100644
--- a/src/oid.h
+++ b/src/oid.h
@@ -1,7 +1,17 @@
#ifndef INCLUDE_oid_h__
#define INCLUDE_oid_h__
-/* This can be useful for internal use */
+/**
+ * Compare the first ('len'*4) bits of two raw formatted oids.
+ * This can be useful for internal use.
+ * Return 0 if they match.
+ */
int git_oid_match_raw(unsigned int len, const unsigned char *a, const unsigned char *b);
+/**
+ * Compare the first 'len' characters of two hex formatted oids.
+ * Return 0 if they match.
+ */
+int git_oid_match_hex(unsigned int len, const unsigned char *a, const unsigned char *b);
+
#endif