aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-28 15:50:04 -0700
committerJunio C Hamano <gitster@pobox.com>2020-04-28 15:50:04 -0700
commit8f5dc5a4af3fa32bf9261b76b0f1146fd15b8643 (patch)
tree0c93139e94d1964edec168d2cf02f6c0e1298b6d /builtin/index-pack.c
parentMerge branch 'js/subtree-doc-update-to-asciidoctor-2' (diff)
parentdiff: restrict when prefetching occurs (diff)
downloadgit-8f5dc5a4af3fa32bf9261b76b0f1146fd15b8643.tar.gz
git-8f5dc5a4af3fa32bf9261b76b0f1146fd15b8643.zip
Merge branch 'jt/avoid-prefetch-when-able-in-diff'
"git diff" in a partial clone learned to avoid lazy loading blob objects in more casese when they are not needed. * jt/avoid-prefetch-when-able-in-diff: diff: restrict when prefetching occurs diff: refactor object read diff: make diff_populate_filespec_options struct promisor-remote: accept 0 as oid_nr in function
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index d967d188a3..f176dd28c8 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1368,9 +1368,8 @@ static void fix_unresolved_deltas(struct hashfile *f)
continue;
oid_array_append(&to_fetch, &d->oid);
}
- if (to_fetch.nr)
- promisor_remote_get_direct(the_repository,
- to_fetch.oid, to_fetch.nr);
+ promisor_remote_get_direct(the_repository,
+ to_fetch.oid, to_fetch.nr);
oid_array_clear(&to_fetch);
}