From: Patryk Obara Date: Sun, 20 Aug 2017 20:09:27 +0000 (+0200) Subject: read-cache: convert to struct object_id X-Git-Tag: v2.15.0-rc0~122^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/bebfecb94c5c71091a07ebbd300740990d3266c7?ds=sidebyside read-cache: convert to struct object_id Replace hashcmp with oidcmp. Signed-off-by: Patryk Obara Signed-off-by: Junio C Hamano --- diff --git a/read-cache.c b/read-cache.c index acfb028f48..72856085f2 100644 --- a/read-cache.c +++ b/read-cache.c @@ -160,9 +160,9 @@ static int ce_compare_data(const struct cache_entry *ce, struct stat *st) int fd = git_open_cloexec(ce->name, O_RDONLY); if (fd >= 0) { - unsigned char sha1[20]; - if (!index_fd(sha1, fd, st, OBJ_BLOB, ce->name, 0)) - match = hashcmp(sha1, ce->oid.hash); + struct object_id oid; + if (!index_fd(oid.hash, fd, st, OBJ_BLOB, ce->name, 0)) + match = oidcmp(&oid, &ce->oid); /* index_fd() closed the file descriptor already */ } return match;