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
This commit is contained in:
4
git.c
4
git.c
@ -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)--;
|
||||
|
||||
Reference in New Issue
Block a user