summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2019-01-07 03:37:54 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-01-08 09:41:06 -0800
commit98374a07c98d1acc200c423b87495365a59cce0b (patch)
tree5d13cd44abc62bd17672bd00a7e8c28a198f5346 /cache-tree.c
parentsha1-file: convert pass-through functions to object_id (diff)
downloadtgif-98374a07c98d1acc200c423b87495365a59cce0b.tar.xz
convert has_sha1_file() callers to has_object_file()
The only remaining callers of has_sha1_file() actually have an object_id already. They can use the "object" variant, rather than dereferencing the hash themselves. The code changes here were completely generated by the included coccinelle patch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 190c6e5aa6..47f3464a1f 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -225,7 +225,7 @@ int cache_tree_fully_valid(struct cache_tree *it)
int i;
if (!it)
return 0;
- if (it->entry_count < 0 || !has_sha1_file(it->oid.hash))
+ if (it->entry_count < 0 || !has_object_file(&it->oid))
return 0;
for (i = 0; i < it->subtree_nr; i++) {
if (!cache_tree_fully_valid(it->down[i]->cache_tree))
@@ -253,7 +253,7 @@ static int update_one(struct cache_tree *it,
*skip_count = 0;
- if (0 <= it->entry_count && has_sha1_file(it->oid.hash))
+ if (0 <= it->entry_count && has_object_file(&it->oid))
return it->entry_count;
/*