]>
git.proxmox.com Git - libgit2.git/blob - src/oid.h
2 * Copyright (C) the libgit2 contributors. All rights reserved.
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_oid_h__
8 #define INCLUDE_oid_h__
12 GIT_INLINE(int) git_oid__hashcmp(const unsigned char *sha1
, const unsigned char *sha2
)
16 for (i
= 0; i
< GIT_OID_RAWSZ
; i
++, sha1
++, sha2
++) {
25 * Compare two oid structures.
27 * @param a first oid structure.
28 * @param b second oid structure.
29 * @return <0, 0, >0 if a < b, a == b, a > b.
31 GIT_INLINE(int) git_oid__cmp(const git_oid
*a
, const git_oid
*b
)
33 return git_oid__hashcmp(a
->id
, b
->id
);