summaryrefslogtreecommitdiff
path: root/builtin/reflog.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 /builtin/reflog.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 'builtin/reflog.c')
-rw-r--r--builtin/reflog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 64a8df4f25..45e9e15006 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -94,7 +94,7 @@ static int tree_is_complete(const struct object_id *oid)
init_tree_desc(&desc, tree->buffer, tree->size);
complete = 1;
while (tree_entry(&desc, &entry)) {
- if (!has_sha1_file(entry.oid->hash) ||
+ if (!has_object_file(entry.oid) ||
(S_ISDIR(entry.mode) && !tree_is_complete(entry.oid))) {
tree->object.flags |= INCOMPLETE;
complete = 0;