diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-04-29 01:50:04 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-29 01:50:04 +0300 |
commit | 8f5dc5a4af3fa32bf9261b76b0f1146fd15b8643 (patch) | |
tree | 0c93139e94d1964edec168d2cf02f6c0e1298b6d /promisor-remote.c | |
parent | 772d78563697c39d5d35d090cb2b5724a1812e7f (diff) | |
parent | 95acf11a3dc3d18ec999f4913ec6c6a54545c6b7 (diff) |
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 'promisor-remote.c')
-rw-r--r-- | promisor-remote.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c index ff8721fd56..baaea12fd6 100644 --- a/promisor-remote.c +++ b/promisor-remote.c @@ -241,6 +241,9 @@ int promisor_remote_get_direct(struct repository *repo, int to_free = 0; int res = -1; + if (oid_nr == 0) + return 0; + promisor_remote_init(); for (r = promisors; r; r = r->next) { |