# We need total control of index splitting here
sane_unset GIT_TEST_SPLIT_INDEX
-# A couple of tests expect the index to have a specific checksum,
-# but the presence of the optional FSMN extension would interfere
-# with those checks, so disable it in this test script.
-sane_unset GIT_FSMONITOR_TEST
+
+# 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_TEST_FSMONITOR
+sane_unset GIT_TEST_INDEX_THREADS
+ # Create a file named as $1 with content read from stdin.
+ # Set the file's mtime to a few seconds in the past to avoid racy situations.
+ create_non_racy_file () {
+ cat >"$1" &&
+ test-tool chmtime =-5 "$1"
+ }
+
test_expect_success 'enable split index' '
git config splitIndex.maxPercentChange 100 &&
git update-index --split-index &&