diff options
author | Jeff King <peff@peff.net> | 2019-01-07 03:37:54 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-08 09:41:06 -0800 |
commit | 98374a07c98d1acc200c423b87495365a59cce0b (patch) | |
tree | 5d13cd44abc62bd17672bd00a7e8c28a198f5346 /sha1-file.c | |
parent | sha1-file: convert pass-through functions to object_id (diff) | |
download | tgif-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 'sha1-file.c')
-rw-r--r-- | sha1-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1-file.c b/sha1-file.c index 73e5cc6fa5..95186c019a 100644 --- a/sha1-file.c +++ b/sha1-file.c @@ -1372,7 +1372,7 @@ int pretend_object_file(void *buf, unsigned long len, enum object_type type, struct cached_object *co; hash_object_file(buf, len, type_name(type), oid); - if (has_sha1_file(oid->hash) || find_cached_object(oid)) + if (has_object_file(oid) || find_cached_object(oid)) return 0; ALLOC_GROW(cached_objects, cached_object_nr + 1, cached_object_alloc); co = &cached_objects[cached_object_nr++]; |