mirror of
https://github.com/git/git.git
synced 2026-01-24 17:41:30 +00:00
Carry non-locking status value in the environment.
If the user has specified '--no-lock-index' when calling git-status, it only seems reasonable that the user intends that option to be carried through to any child forks/procs as well. Currently, the '--no-lock-status' call is lost when submodules are checked. This change places the desired option into the environment, which is in turn passed down to all subsequent children. With cmd_status checking for '--no-lock--status' first from args then from environment, we're able to keep the option set in all children. Signed-off-by: J Wyman <jeremy.wyman@microsoft.com>
This commit is contained in:
committed by
Johannes Schindelin
parent
b6724d570f
commit
4e4124f257
@@ -1378,6 +1378,11 @@ int cmd_status(int argc, const char **argv, const char *prefix)
|
||||
finalize_colopts(&s.colopts, -1);
|
||||
finalize_deferred_config(&s);
|
||||
|
||||
if (no_lock_index)
|
||||
setenv("GIT_LOCK_INDEX", "false", 1);
|
||||
else if (!git_parse_maybe_bool(getenv("GIT_LOCK_INDEX")))
|
||||
no_lock_index = 1;
|
||||
|
||||
handle_untracked_files_arg(&s);
|
||||
if (show_ignored_in_status)
|
||||
s.show_ignored_files = 1;
|
||||
|
||||
Reference in New Issue
Block a user