diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:48 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:49 +0900 |
commit | d4e93836a6a072e392b20d7daf604fd41e15ecf9 (patch) | |
tree | 69f37e3a5a7239b416a0c75b9d52114cb9e048d3 /git.c | |
parent | Merge branch 'hn/string-list-doc' (diff) | |
parent | git: add --no-optional-locks option (diff) | |
download | tgif-d4e93836a6a072e392b20d7daf604fd41e15ecf9.tar.xz |
Merge branch 'jk/no-optional-locks'
Some commands (most notably "git status") makes an opportunistic
update when performing a read-only operation to help optimize later
operations in the same repository. The new "--no-optional-locks"
option can be passed to Git to disable them.
* jk/no-optional-locks:
git: add --no-optional-locks option
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -182,6 +182,10 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) setenv(GIT_ICASE_PATHSPECS_ENVIRONMENT, "1", 1); if (envchanged) *envchanged = 1; + } else if (!strcmp(cmd, "--no-optional-locks")) { + setenv(GIT_OPTIONAL_LOCKS_ENVIRONMENT, "0", 1); + if (envchanged) + *envchanged = 1; } else if (!strcmp(cmd, "--shallow-file")) { (*argv)++; (*argc)--; |