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>
This commit is contained in:
committed by
Junio C Hamano
parent
c0566d78aa
commit
d40abc8e95
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user