Skip to content

Commit

Permalink
t7529: create test to explore shared-index and sparse-index
Browse files Browse the repository at this point in the history
The shared-index (aka split-index) and sparse-index features are
incompatible.  Create a set of tests to try to turn on both and see
what happens.  Also include FSMonitor in the mix.

In repo-6: we start with a cone-mode sparse-checkout with sparse-index
and then try to split it. This is correctly detected and reports an
error.

In repo-1..5: we start with a split-index and then try to turn on
sparse-checkout w/ or w/o sparse-index.  This does not fail
immediately, but rather it sets up an inconsistent state such that
later commands start to randomly fail.  I've captured the error
messages and BUG() asserts that I saw.  Sometimes successive test runs
would exit with different errors and I've tried to capture that in the
tests.

Sometimes the error/BUG() came from the FSMonitor code because the
length of the fsmonitor-dirty bitvector was larger than length of the
(now sparse) index.

Further complicating the issue is that Microsoft/git.git changed the
default value of `index.sparse` in [1], so tests sometimes behave
differently over there.

[1] microsoft@b584ffd

NEEDSWORK: I'm not proposing a solution to this problem at this point
because I want to use this commit to gather feedback on the issue.
I've left TODO comments to insert 'test_must_fail' calls on the
commands that I think should fail (and then the ###### block comment
and everything following it can probably be deleted from the test).

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
  • Loading branch information
jeffhostetler committed Nov 29, 2023
1 parent 564d025 commit 4513365
Showing 1 changed file with 408 additions and 0 deletions.
Loading

0 comments on commit 4513365

Please sign in to comment.