Skip to content

Commit c49cb87

Browse files
J WymanGit for Windows Build Agent
J Wyman
authored and
Git for Windows Build Agent
committed
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 <[email protected]>
1 parent e176eab commit c49cb87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

builtin/commit.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,11 @@ int cmd_status(int argc, const char **argv, const char *prefix)
13731373
finalize_colopts(&s.colopts, -1);
13741374
finalize_deferred_config(&s);
13751375

1376+
if (no_lock_index)
1377+
setenv("GIT_LOCK_INDEX", "false", 1);
1378+
else if (!git_parse_maybe_bool(getenv("GIT_LOCK_INDEX")))
1379+
no_lock_index = 1;
1380+
13761381
handle_untracked_files_arg(&s);
13771382
if (show_ignored_in_status)
13781383
s.show_ignored_files = 1;

0 commit comments

Comments
 (0)