From d40abc8e95f75b529feb140178b69a3783c2d108 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 20 Jun 2019 03:41:49 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- khash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'khash.h') diff --git a/khash.h b/khash.h index f911d2b005..21c2095216 100644 --- a/khash.h +++ b/khash.h @@ -326,7 +326,7 @@ static const double __ac_HASH_UPPER = 0.77; static inline unsigned int oidhash_by_value(struct object_id oid) { - return sha1hash(oid.hash); + return oidhash(&oid); } static inline int oideq_by_value(struct object_id a, struct object_id b) -- cgit v1.2.1