summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-03 15:42:48 +0900
committerJunio C Hamano <gitster@pobox.com>2017-10-03 15:42:49 +0900
commitd4e93836a6a072e392b20d7daf604fd41e15ecf9 (patch)
tree69f37e3a5a7239b416a0c75b9d52114cb9e048d3 /cache.h
parentd9ec072a2903f31a0e1afde4125f62b9fc57f620 (diff)
parent27344d6a6c8056664966e11acf674e5da6dd7ee3 (diff)
downloadgit-d4e93836a6a072e392b20d7daf604fd41e15ecf9.tar.gz
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 'cache.h')
-rw-r--r--cache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index ea6c236e0f..6440e2bf21 100644
--- a/cache.h
+++ b/cache.h
@@ -444,6 +444,7 @@ static inline enum object_type object_type(unsigned int mode)
#define GIT_NOGLOB_PATHSPECS_ENVIRONMENT "GIT_NOGLOB_PATHSPECS"
#define GIT_ICASE_PATHSPECS_ENVIRONMENT "GIT_ICASE_PATHSPECS"
#define GIT_QUARANTINE_ENVIRONMENT "GIT_QUARANTINE_PATH"
+#define GIT_OPTIONAL_LOCKS_ENVIRONMENT "GIT_OPTIONAL_LOCKS"
/*
* This environment variable is expected to contain a boolean indicating
@@ -784,6 +785,11 @@ extern int protect_ntfs;
extern int ref_paranoia;
/*
+ * Returns the boolean value of $GIT_OPTIONAL_LOCKS (or the default value).
+ */
+int use_optional_locks(void);
+
+/*
* The character that begins a commented line in user-editable file
* that is subject to stripspace.
*/