Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatryk Obara <patryk.obara@gmail.com>2017-08-20 23:09:27 +0300
committerJunio C Hamano <gitster@pobox.com>2017-08-21 07:51:08 +0300
commitbebfecb94c5c71091a07ebbd300740990d3266c7 (patch)
treed650b4c1424e3b48440e837907620efe1f296f68 /read-cache.c
parenteab8bf292b9616772245717ce8069ec1a4354bd4 (diff)
read-cache: convert to struct object_id
Replace hashcmp with oidcmp. Signed-off-by: Patryk Obara <patryk.obara@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c6
1 files changed, 3 insertions, 3 deletions
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;