aboutsummaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-10-28 09:27:15 +0200
committerMichael Haggerty <mhagger@alum.mit.edu>2017-10-28 09:27:15 +0200
commitff08e56cde739152a59a86f5aa996954a2ec0614 (patch)
tree9c7bc94151c5a082377ecb438e66aea140924edb /read-cache.c
parent2f899857a9f425cb59f8a15c2ea7a52100c51a23 (diff)
parent4f01e5080c4a7eee69da47c958888358e6127584 (diff)
downloadgit-ff08e56cde739152a59a86f5aa996954a2ec0614.tar.gz
git-ff08e56cde739152a59a86f5aa996954a2ec0614.tar.xz
Merge branch 'bc/object-id' into base
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 65f4fe837..7766196af 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -191,7 +191,7 @@ static int ce_compare_link(const struct cache_entry *ce, size_t expected_size)
static int ce_compare_gitlink(const struct cache_entry *ce)
{
- unsigned char sha1[20];
+ struct object_id oid;
/*
* We don't actually require that the .git directory
@@ -201,9 +201,9 @@ static int ce_compare_gitlink(const struct cache_entry *ce)
*
* If so, we consider it always to match.
*/
- if (resolve_gitlink_ref(ce->name, "HEAD", sha1) < 0)
+ if (resolve_gitlink_ref(ce->name, "HEAD", &oid) < 0)
return 0;
- return hashcmp(sha1, ce->oid.hash);
+ return oidcmp(&oid, &ce->oid);
}
static int ce_modified_check_fs(const struct cache_entry *ce, struct stat *st)