summaryrefslogtreecommitdiff
path: root/object-file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-17 00:42:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-17 00:42:53 (GMT)
commit8721e2eaedd0290ef399f638912a49b36402e715 (patch)
tree3adba2f16502f304808a5ec8f38e96bf3830f988 /object-file.c
parentbd4232fac3319890429ec303e2f7c3d287c8eaa3 (diff)
parentef830cc4341260ef45ffe6c7164e23505d45a5a2 (diff)
downloadgit-8721e2eaedd0290ef399f638912a49b36402e715.zip
git-8721e2eaedd0290ef399f638912a49b36402e715.tar.gz
git-8721e2eaedd0290ef399f638912a49b36402e715.tar.bz2
Merge branch 'jt/partial-clone-submodule-1'
Prepare the internals for lazily fetching objects in submodules from their promisor remotes. * jt/partial-clone-submodule-1: promisor-remote: teach lazy-fetch in any repo run-command: refactor subprocess env preparation submodule: refrain from filtering GIT_CONFIG_COUNT promisor-remote: support per-repository config repository: move global r_f_p_c to repo struct
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/object-file.c b/object-file.c
index b9c3219..ecca5a8 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1584,15 +1584,12 @@ static int do_oid_object_info_extended(struct repository *r,
}
/* Check if it is a missing object */
- if (fetch_if_missing && has_promisor_remote() &&
- !already_retried && r == the_repository &&
+ if (fetch_if_missing && repo_has_promisor_remote(r) &&
+ !already_retried &&
!(flags & OBJECT_INFO_SKIP_FETCH_OBJECT)) {
/*
* TODO Investigate checking promisor_remote_get_direct()
* TODO return value and stopping on error here.
- * TODO Pass a repository struct through
- * promisor_remote_get_direct(), such that arbitrary
- * repositories work.
*/
promisor_remote_get_direct(r, real, 1);
already_retried = 1;