summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-04-29 07:34:13 -0700
committerRussell Belfer <rb@github.com>2013-04-29 07:34:13 -0700
commit0c72248b9171acee7480a77edee89fa20fabdae8 (patch)
tree5ff8ded253a82b1ab8ac798b33cf74a56a6963d9 /include/git2
parent0f85c208406ef10e2f1c7fea6fb42ef52fe65134 (diff)
downloadlibgit2-0c72248b9171acee7480a77edee89fa20fabdae8.tar.gz
Introduce git_oid_compare, an exported oid cmp
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/oid.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/oid.h b/include/git2/oid.h
index 862f4b202..c35acdcdc 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -145,6 +145,15 @@ GIT_EXTERN(void) git_oid_cpy(git_oid *out, const git_oid *src);
* @param b second oid structure.
* @return <0, 0, >0 if a < b, a == b, a > b.
*/
+GIT_EXTERN(int) git_oid_compare(const git_oid *oid_a, const git_oid *oid_b);
+
+/**
+ * Compare two oid structures.
+ *
+ * @param a first oid structure.
+ * @param b second oid structure.
+ * @return <0, 0, >0 if a < b, a == b, a > b.
+ */
GIT_INLINE(int) git_oid_cmp(const git_oid *a, const git_oid *b)
{
const unsigned char *sha1 = a->id;