aboutsummaryrefslogtreecommitdiffstats
path: root/environment.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-03-07 15:59:40 -0800
committerJunio C Hamano <gitster@pobox.com>2024-03-07 15:59:40 -0800
commit2c206fc82abb3ae3d8a5fb5b3c07c1a933007f31 (patch)
tree55466cec9abcec3afafe741324490c2c47367d3a /environment.c
parent43072b4ca132437f21975ac6acc6b72dc22fd398 (diff)
parente6d5479e7ac301ae8d11daa3d8ef748e891c91c3 (diff)
downloadgit-2c206fc82abb3ae3d8a5fb5b3c07c1a933007f31.tar.gz
Merge branch 'jc/no-lazy-fetch'
"git --no-lazy-fetch cmd" allows to run "cmd" while disabling lazy fetching of objects from the promisor remote, which may be handy for debugging. * jc/no-lazy-fetch: git: extend --no-lazy-fetch to work across subprocesses git: document GIT_NO_REPLACE_OBJECTS environment variable git: --no-lazy-fetch option
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/environment.c b/environment.c
index 90632a39bc..60706ea398 100644
--- a/environment.c
+++ b/environment.c
@@ -207,6 +207,9 @@ void setup_git_env(const char *git_dir)
shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT);
if (shallow_file)
set_alternate_shallow_file(the_repository, shallow_file, 0);
+
+ if (git_env_bool(NO_LAZY_FETCH_ENVIRONMENT, 0))
+ fetch_if_missing = 0;
}
int is_bare_repository(void)