]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t9210, t9211: disable GIT_TEST_SPLIT_INDEX for scalar clone tests
authorPaul Tarjan <github@paulisageek.com>
Thu, 9 Apr 2026 04:59:23 +0000 (04:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Apr 2026 17:59:27 +0000 (10:59 -0700)
index.skipHash (Scalar default) and split-index are incompatible:
the shared index gets a null OID when skipHash skips computing the
hash, and the null OID causes the shared index to not be loaded on
re-read.  This triggers a BUG assertion in fsmonitor when the
fsmonitor_dirty bitmap references more entries than the (now empty)
index has.

Disable GIT_TEST_SPLIT_INDEX in the scalar clone tests that hit
this: tests 12, 13, and 22 in t9210 (matching the existing
workaround in test 16), and all of t9211 (every test does scalar
clone).

Signed-off-by: Paul Tarjan <github@paulisageek.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9210-scalar.sh
t/t9211-scalar-clone.sh

index 009437a5f3168fa9e36c5eb30291fcddfc431fdc..f2a6df77ceeb011b66df7e2208b73e367d3b2893 100755 (executable)
@@ -152,6 +152,10 @@ test_expect_success 'set up repository to clone' '
 '
 
 test_expect_success 'scalar clone' '
+       # index.skipHash (Scalar default) and GIT_TEST_SPLIT_INDEX are
+       # incompatible: the shared index gets a null OID and fails to
+       # load on re-read.
+       sane_unset GIT_TEST_SPLIT_INDEX &&
        second=$(git rev-parse --verify second:second.t) &&
        scalar clone "file://$(pwd)" cloned --single-branch &&
        (
@@ -182,6 +186,7 @@ test_expect_success 'scalar clone' '
 '
 
 test_expect_success 'scalar clone --no-... opts' '
+       sane_unset GIT_TEST_SPLIT_INDEX &&
        # Note: redirect stderr always to avoid having a verbose test
        # run result in a difference in the --[no-]progress option.
        GIT_TRACE2_EVENT="$(pwd)/no-opt-trace" scalar clone \
@@ -307,6 +312,7 @@ test_expect_success '`scalar [...] <dir>` errors out when dir is missing' '
 
 SQ="'"
 test_expect_success UNZIP 'scalar diagnose' '
+       sane_unset GIT_TEST_SPLIT_INDEX &&
        scalar clone "file://$(pwd)" cloned --single-branch &&
        git repack &&
        echo "$(pwd)/.git/objects/" >>cloned/src/.git/objects/info/alternates &&
index bfbf22a4621843cfde09e813ea7a3e401843185c..2043f48a1acdf7a827be9a0e2c1362e764440110 100755 (executable)
@@ -8,6 +8,11 @@ test_description='test the `scalar clone` subcommand'
 GIT_TEST_MAINT_SCHEDULER="crontab:test-tool crontab cron.txt,launchctl:true,schtasks:true"
 export GIT_TEST_MAINT_SCHEDULER
 
+# index.skipHash (Scalar default) and GIT_TEST_SPLIT_INDEX are
+# incompatible: the shared index gets a null OID and fails to
+# load on re-read.  Every test here uses scalar clone.
+sane_unset GIT_TEST_SPLIT_INDEX
+
 test_expect_success 'set up repository to clone' '
        rm -rf .git &&
        git init to-clone &&