summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorBen Peart <benpeart@microsoft.com>2018-10-10 15:59:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-11 06:32:48 (GMT)
commitc780b9cfe8d79331ed9797e328b1bf80666c4ac2 (patch)
tree3d842486adb1555fbc23590c9a89fd9c1835a52b /t
parent3b1d9e045e1ad6c2cd5cbe668ccb740a82b50efb (diff)
downloadgit-c780b9cfe8d79331ed9797e328b1bf80666c4ac2.zip
git-c780b9cfe8d79331ed9797e328b1bf80666c4ac2.tar.gz
git-c780b9cfe8d79331ed9797e328b1bf80666c4ac2.tar.bz2
config: add new index.threads config setting
Add support for a new index.threads config setting which will be used to control the threading code in do_read_index(). A value of 0 will tell the index code to automatically determine the correct number of threads to use. A value of 1 will make the code single threaded. A value greater than 1 will set the maximum number of threads to use. For testing purposes, this setting can be overwritten by setting the GIT_TEST_INDEX_THREADS=<n> environment variable to a value greater than 0. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/README5
-rwxr-xr-xt/t1700-split-index.sh5
2 files changed, 10 insertions, 0 deletions
diff --git a/t/README b/t/README
index 3ea6c85..8f5c062 100644
--- a/t/README
+++ b/t/README
@@ -327,6 +327,11 @@ GIT_TEST_COMMIT_GRAPH=<boolean>, when true, forces the commit-graph to
be written after every 'git commit' command, and overrides the
'core.commitGraph' setting to true.
+GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
+of the index for the whole test suite by bypassing the default number of
+cache entries and thread minimums. Setting this to 1 will make the
+index loading single threaded.
+
Naming Tests
------------
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 8e17f8e..ef9349b 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -6,7 +6,12 @@ test_description='split index mode tests'
# We need total control of index splitting here
sane_unset GIT_TEST_SPLIT_INDEX
+
+# Testing a hard coded SHA against an index with an extension
+# that can vary from run to run is problematic so we disable
+# those extensions.
sane_unset GIT_FSMONITOR_TEST
+sane_unset GIT_TEST_INDEX_THREADS
test_expect_success 'enable split index' '
git config splitIndex.maxPercentChange 100 &&