From 3318238db9498749db6d4feb7a804d366eccfa82 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Wed, 5 Aug 2020 16:06:50 -0700 Subject: apply: do not lazy fetch when applying binary When applying a binary patch, as an optimization, "apply" checks if the postimage is already present. During this fetch, it is perfectly expected for the postimage not to be present, so there is no need to lazy-fetch missing objects. Teach "apply" not to lazy-fetch in this case. Signed-off-by: Jonathan Tan 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 8bff604dbe..402d80602a 100644 --- a/apply.c +++ b/apply.c @@ -3178,7 +3178,7 @@ static int apply_binary(struct apply_state *state, return 0; /* deletion patch */ } - if (has_object_file(&oid)) { + if (has_object(the_repository, &oid, 0)) { /* We already have the postimage */ enum object_type type; unsigned long size; -- cgit v1.2.3