From 98374a07c98d1acc200c423b87495365a59cce0b Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 7 Jan 2019 03:37:54 -0500 Subject: 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 Signed-off-by: Junio C Hamano --- apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apply.c') diff --git a/apply.c b/apply.c index 01793d6126..b8e257ead2 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; -- cgit v1.2.3