summaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2019-06-20 03:41:49 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-06-20 10:44:22 -0700
commitd40abc8e95f75b529feb140178b69a3783c2d108 (patch)
treed0de753e3ef3e66b033f2b179441e504f71aa4a0 /diffcore-rename.c
parenthash.h: move object_id definition from cache.h (diff)
downloadtgif-d40abc8e95f75b529feb140178b69a3783c2d108.tar.xz
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 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 07bd34b631..1e50d491c1 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -266,7 +266,7 @@ static unsigned int hash_filespec(struct repository *r,
hash_object_file(filespec->data, filespec->size, "blob",
&filespec->oid);
}
- return sha1hash(filespec->oid.hash);
+ return oidhash(&filespec->oid);
}
static int find_identical_files(struct hashmap *srcs,