summaryrefslogtreecommitdiff
path: root/unpack-trees.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 /unpack-trees.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 'unpack-trees.c')
-rw-r--r--unpack-trees.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 71b70cc..0dc76ed 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1541,15 +1541,15 @@ static int verify_clean_subdirectory(const struct cache_entry *ce,
int cnt = 0;
if (S_ISGITLINK(ce->ce_mode)) {
- unsigned char sha1[20];
- int sub_head = resolve_gitlink_ref(ce->name, "HEAD", sha1);
+ struct object_id oid;
+ int sub_head = resolve_gitlink_ref(ce->name, "HEAD", oid.hash);
/*
* If we are not going to update the submodule, then
* we don't care.
*/
- if (!sub_head && !hashcmp(sha1, ce->oid.hash))
+ if (!sub_head && !oidcmp(&oid, &ce->oid))
return 0;
- return verify_clean_submodule(sub_head ? NULL : sha1_to_hex(sha1),
+ return verify_clean_submodule(sub_head ? NULL : oid_to_hex(&oid),
ce, error_type, o);
}