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
This commit is contained in:
Junio C Hamano
2021-07-16 17:42:53 -07:00
14 changed files with 196 additions and 82 deletions

View File

@ -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;