diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-03-07 15:59:40 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-07 15:59:40 -0800 |
commit | 2c206fc82abb3ae3d8a5fb5b3c07c1a933007f31 (patch) | |
tree | 55466cec9abcec3afafe741324490c2c47367d3a /git.c | |
parent | 43072b4ca132437f21975ac6acc6b72dc22fd398 (diff) | |
parent | e6d5479e7ac301ae8d11daa3d8ef748e891c91c3 (diff) | |
download | git-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 'git.c')
-rw-r--r-- | git.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include "exec-cmd.h" #include "gettext.h" #include "help.h" +#include "object-file.h" #include "pager.h" #include "read-cache-ll.h" #include "run-command.h" @@ -186,6 +187,11 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) use_pager = 0; if (envchanged) *envchanged = 1; + } else if (!strcmp(cmd, "--no-lazy-fetch")) { + fetch_if_missing = 0; + setenv(NO_LAZY_FETCH_ENVIRONMENT, "1", 1); + if (envchanged) + *envchanged = 1; } else if (!strcmp(cmd, "--no-replace-objects")) { disable_replace_refs(); setenv(NO_REPLACE_OBJECTS_ENVIRONMENT, "1", 1); |