summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:07:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-16 02:05:51 (GMT)
commit1053fe829c037c5a725786bac35d05a113c91f55 (patch)
treee8abb9e7099dc3b76c1ea63c5a6c1401338feb78 /read-cache.c
parentbcd29864737099ff78de3db8b1d518f2aea51bc9 (diff)
downloadgit-1053fe829c037c5a725786bac35d05a113c91f55.zip
git-1053fe829c037c5a725786bac35d05a113c91f55.tar.gz
git-1053fe829c037c5a725786bac35d05a113c91f55.tar.bz2
Convert remaining callers of resolve_gitlink_ref to object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> 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 65f4fe8..131485b 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.hash) < 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)