summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:19 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:19 +0900
commit32dc15dec1cd9e9fada2983094484ae6e4c93647 (patch)
tree625393be9fb971cf5c803d2ba3997a4741e4cbc7 /sha1-file.c
parentMerge branch 'ab/gc-docs' (diff)
parentdiff: batch fetching of missing blobs (diff)
downloadtgif-32dc15dec1cd9e9fada2983094484ae6e4c93647.tar.xz
Merge branch 'jt/batch-fetch-blobs-in-diff'
While running "git diff" in a lazy clone, we can upfront know which missing blobs we will need, instead of waiting for the on-demand machinery to discover them one by one. Aim to achieve better performance by batching the request for these promised blobs. * jt/batch-fetch-blobs-in-diff: diff: batch fetching of missing blobs sha1-file: support OBJECT_INFO_FOR_PREFETCH
Diffstat (limited to 'sha1-file.c')
-rw-r--r--sha1-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1-file.c b/sha1-file.c
index bcd9470bce..ed5c50dac4 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -1378,7 +1378,8 @@ int oid_object_info_extended(struct repository *r, const struct object_id *oid,
/* Check if it is a missing object */
if (fetch_if_missing && repository_format_partial_clone &&
- !already_retried && r == the_repository) {
+ !already_retried && r == the_repository &&
+ !(flags & OBJECT_INFO_FOR_PREFETCH)) {
/*
* TODO Investigate having fetch_object() return
* TODO error/success and stopping the music here.