diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-10-15 22:07:06 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-16 11:05:51 +0900 |
commit | 1053fe829c037c5a725786bac35d05a113c91f55 (patch) | |
tree | e8abb9e7099dc3b76c1ea63c5a6c1401338feb78 /read-cache.c | |
parent | sha1_file: convert index_path and index_fd to struct object_id (diff) | |
download | tgif-1053fe829c037c5a725786bac35d05a113c91f55.tar.xz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/read-cache.c b/read-cache.c index 65f4fe8375..131485b3a6 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) |