diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-22 06:39:38 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-23 09:48:21 -0500 |
commit | 5a45616c16fcff7051416c64703988c787015259 (patch) | |
tree | a66f858c6b6d0c0d42844fff8147e99f98e8a137 | |
parent | c71590d064a18ad38e8ba521d7433b4ce25f44b0 (diff) | |
download | libgit2-5a45616c16fcff7051416c64703988c787015259.tar.gz |
oidmap: hash on the id, not the object
We explicitly want to hash on the id data, not the beginning of the
object data, which may contain other information in the future.
-rw-r--r-- | src/oidmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/oidmap.c b/src/oidmap.c index 0ae8bf33e..eaf9fa051 100644 --- a/src/oidmap.c +++ b/src/oidmap.c @@ -19,7 +19,7 @@ __KHASH_TYPE(oid, const git_oid *, void *) GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid) { khint_t h; - memcpy(&h, oid, sizeof(khint_t)); + memcpy(&h, oid->id, sizeof(khint_t)); return h; } |