diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-03 09:42:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-03 09:42:49 +0300 |
commit | d4e93836a6a072e392b20d7daf604fd41e15ecf9 (patch) | |
tree | 69f37e3a5a7239b416a0c75b9d52114cb9e048d3 /environment.c | |
parent | d9ec072a2903f31a0e1afde4125f62b9fc57f620 (diff) | |
parent | 27344d6a6c8056664966e11acf674e5da6dd7ee3 (diff) |
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 'environment.c')
-rw-r--r-- | environment.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/environment.c b/environment.c index f1f934b6fd..8289c25b44 100644 --- a/environment.c +++ b/environment.c @@ -338,3 +338,8 @@ void reset_shared_repository(void) { need_shared_repository_from_config = 1; } + +int use_optional_locks(void) +{ + return git_env_bool(GIT_OPTIONAL_LOCKS_ENVIRONMENT, 1); +} |