summaryrefslogtreecommitdiff
path: root/pack-objects.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-06-20 07:41:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-20 17:44:22 (GMT)
commitd40abc8e95f75b529feb140178b69a3783c2d108 (patch)
treed0de753e3ef3e66b033f2b179441e504f71aa4a0 /pack-objects.c
parentc0566d78aac1d5f8ff90c75f2d936487bb5a8d84 (diff)
downloadgit-d40abc8e95f75b529feb140178b69a3783c2d108.zip
git-d40abc8e95f75b529feb140178b69a3783c2d108.tar.gz
git-d40abc8e95f75b529feb140178b69a3783c2d108.tar.bz2
hashmap: convert sha1hash() to oidhash()
There are no callers left of sha1hash() that do not simply pass the "hash" member of a "struct object_id". Let's get rid of the outdated sha1-specific function and provide one that operates on the whole struct (even though the technique, taking the first few bytes of the hash, will remain the same). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-objects.c b/pack-objects.c
index 00a5f6e..5256029 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -11,7 +11,7 @@ static uint32_t locate_object_entry_hash(struct packing_data *pdata,
{
uint32_t i, mask = (pdata->index_size - 1);
- i = sha1hash(oid->hash) & mask;
+ i = oidhash(oid) & mask;
while (pdata->index[i] > 0) {
uint32_t pos = pdata->index[i] - 1;