aboutsummaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-13 14:13:39 -0700
committerJunio C Hamano <gitster@pobox.com>2020-08-13 14:13:39 -0700
commitd1a8a8979d61a889b915dca36aea9c2a88d0f3f7 (patch)
tree02eece403714ca30f78b50c485e323db0ab44b97 /apply.c
parentMerge branch 'bc/sha-256-cvs-svn-updates' (diff)
parentfsck: do not lazy fetch known non-promisor object (diff)
downloadgit-d1a8a8979d61a889b915dca36aea9c2a88d0f3f7.tar.gz
git-d1a8a8979d61a889b915dca36aea9c2a88d0f3f7.zip
Merge branch 'jt/has_object'
A new helper function has_object() has been introduced to make it easier to mark object existence checks that do and don't want to trigger lazy fetches, and a few such checks are converted using it. * jt/has_object: fsck: do not lazy fetch known non-promisor object pack-objects: no fetch when allow-{any,promisor} apply: do not lazy fetch when applying binary sha1-file: introduce no-lazy-fetch has_object()
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 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;