Skip to content

Commit 0210c6d

Browse files
committed
Merge pull request #1004 from whoisj/nolock-env
Carry non-locking status value in the environment.
2 parents be5b22b + 4f212a5 commit 0210c6d

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
@@ -1419,6 +1419,11 @@ int cmd_status(int argc, const char **argv, const char *prefix)
14191419
finalize_colopts(&s.colopts, -1);
14201420
finalize_deferred_config(&s);
14211421

1422+
if (no_lock_index)
1423+
setenv("GIT_LOCK_INDEX", "false", 1);
1424+
else if (!git_parse_maybe_bool(getenv("GIT_LOCK_INDEX")))
1425+
no_lock_index = 1;
1426+
14221427
handle_untracked_files_arg(&s);
14231428
handle_ignored_arg(&s);
14241429

0 commit comments

Comments
 (0)