On 3/9/2021 3:20 PM, Derrick Stolee wrote: > On 2/27/2021 7:32 AM, SZEDER Gábor wrote: >> On Tue, Feb 23, 2021 at 08:14:26PM +0000, Derrick Stolee via GitGitGadget wrote: >>> +test_expect_success 'sparse-index enabled and disabled' ' >>> + git -C repo sparse-checkout init --cone --sparse-index && >>> + test_cmp_config -C repo true extensions.sparseIndex && >>> + test-tool -C repo read-cache --table >cache && >>> + grep " tree " cache && >>> + >>> + git -C repo sparse-checkout disable && >>> + test-tool -C repo read-cache --table >cache && >>> + ! grep " tree " cache && >>> + git -C repo config --list >config && >>> + ! grep extensions.sparseindex config >>> +' >> >> This test passes with GIT_TEST_SPLIT_INDEX=1 at the moment, because, >> unfortunately, GIT_TEST_SPLIT_INDEX has been broken for the past two >> years. However, if I run it with my WIP fixes for that issue [1], >> then it will fail: >> >> +git -C repo sparse-checkout init --cone --sparse-index >> +test_cmp_config -C repo true extensions.sparseIndex >> +test-tool -C repo read-cache --table >> +grep tree cache >> error: last command exited with $?=1 >> not ok 16 - sparse-index enabled and disabled >> >> https://travis-ci.com/github/szeder/git-cooking-topics-for-travis-ci/jobs/486702444#L2594 >> >> [1] Try to run it with: >> >> https://github.com/szeder/git split-index-fixes >> >> The code is, I believe, close to final, the commit messages, >> however, are far from being finished. > > I'll keep that in mind. I should have added a variable > that disables GIT_TEST_SPLIT_INDEX for this test script, > since the sparse-index is (currently) incompatible with > the split-index. I bet that the test is failing because > it isn't actually writing the sparse-directory entry due > to that short-circuit check. The next version will include GIT_TEST_SPLIT_INDEX=0 at the start and that will make it work with your branch. Thanks, -Stolee