diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-21 19:17:40 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-04-10 15:56:57 -0400 |
| commit | 526e8869bf5f3d111b427d58d79d849f9f3df211 (patch) | |
| tree | 714f5ed6da144653e6b1bb92152d16f39ee161a7 /src/libgit2/oid.h | |
| parent | 7367a9d5f71ae8a4c7e3e97e5c42c0cd034672c9 (diff) | |
| download | libgit2-526e8869bf5f3d111b427d58d79d849f9f3df211.tar.gz | |
oid: `hashcmp` is now `raw_cmp`
We will talk about "raw" oids as untyped blobs of data; use a name for
the comparison function that is in keeping with that.
Diffstat (limited to 'src/libgit2/oid.h')
| -rw-r--r-- | src/libgit2/oid.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libgit2/oid.h b/src/libgit2/oid.h index 5baec33e5..2df2e600f 100644 --- a/src/libgit2/oid.h +++ b/src/libgit2/oid.h @@ -25,7 +25,9 @@ extern const git_oid git_oid__empty_tree_sha1; */ char *git_oid_allocfmt(const git_oid *id); -GIT_INLINE(int) git_oid__hashcmp(const unsigned char *sha1, const unsigned char *sha2) +GIT_INLINE(int) git_oid_raw_cmp( + const unsigned char *sha1, + const unsigned char *sha2) { return memcmp(sha1, sha2, GIT_OID_RAWSZ); } @@ -39,7 +41,7 @@ GIT_INLINE(int) git_oid__hashcmp(const unsigned char *sha1, const unsigned char */ GIT_INLINE(int) git_oid__cmp(const git_oid *a, const git_oid *b) { - return git_oid__hashcmp(a->id, b->id); + return git_oid_raw_cmp(a->id, b->id); } GIT_INLINE(void) git_oid__cpy_prefix( |
