summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-07 08:37:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-08 17:41:06 (GMT)
commit98374a07c98d1acc200c423b87495365a59cce0b (patch)
tree5d13cd44abc62bd17672bd00a7e8c28a198f5346 /apply.c
parentd7a245730b4397e50592e1f4ebce765f7fbf5f93 (diff)
downloadgit-98374a07c98d1acc200c423b87495365a59cce0b.zip
git-98374a07c98d1acc200c423b87495365a59cce0b.tar.gz
git-98374a07c98d1acc200c423b87495365a59cce0b.tar.bz2
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 'apply.c')
-rw-r--r--apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index 01793d6..b8e257e 100644
--- a/apply.c
+++ b/apply.c
@@ -3183,7 +3183,7 @@ static int apply_binary(struct apply_state *state,
return 0; /* deletion patch */
}
- if (has_sha1_file(oid.hash)) {
+ if (has_object_file(&oid)) {
/* We already have the postimage */
enum object_type type;
unsigned long size;