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>
This commit is contained in:

committed by
Junio C Hamano

parent
d7a245730b
commit
98374a07c9
@ -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;
|
||||
|
Reference in New Issue
Block a user