Merge pull request #1004 from whoisj/nolock-env

Carry non-locking status value in the environment.
This commit is contained in:
Johannes Schindelin
2017-10-29 16:49:26 +01:00

View File

@@ -1391,6 +1391,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;