summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:03 (GMT)
commite27bfaaee37c4c9d7e94f945f82c3e452d2dc071 (patch)
treeb9714515dd504b5d4cff12f4ea53df1a879cb28c /config.c
parent340fde61bea189b87268aa20581e243deb744577 (diff)
parent77ff1127a4ca340fb9e81861a9851b0c3701bdc1 (diff)
downloadgit-e27bfaaee37c4c9d7e94f945f82c3e452d2dc071.zip
git-e27bfaaee37c4c9d7e94f945f82c3e452d2dc071.tar.gz
git-e27bfaaee37c4c9d7e94f945f82c3e452d2dc071.tar.bz2
Merge branch 'bp/read-cache-parallel'
A new extension to the index file has been introduced, which allows the file to be read in parallel. * bp/read-cache-parallel: read-cache: load cache entries on worker threads ieot: add Index Entry Offset Table (IEOT) extension read-cache: load cache extensions on a worker thread config: add new index.threads config setting eoie: add End of Index Entry (EOIE) extension read-cache: clean up casting and byte decoding read-cache.c: optimize reading index format v4
Diffstat (limited to 'config.c')
-rw-r--r--config.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/config.c b/config.c
index 3555c63..4051e38 100644
--- a/config.c
+++ b/config.c
@@ -2289,6 +2289,24 @@ int git_config_get_fsmonitor(void)
return 0;
}
+int git_config_get_index_threads(void)
+{
+ int is_bool, val = 0;
+
+ val = git_env_ulong("GIT_TEST_INDEX_THREADS", 0);
+ if (val)
+ return val;
+
+ if (!git_config_get_bool_or_int("index.threads", &is_bool, &val)) {
+ if (is_bool)
+ return val ? 0 : 1;
+ else
+ return val;
+ }
+
+ return 0; /* auto */
+}
+
NORETURN
void git_die_config_linenr(const char *key, const char *filename, int linenr)
{