t7519: rewrite sparse index test
commit522d3cec0089228d0b1a5178c396662953cb2dc2
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 8 Sep 2021 01:42:25 +0000 (8 01:42 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Sep 2021 05:41:09 +0000 (7 22:41 -0700)
tree50626d3df871d4b47a13244e110e3006813d7527
parent716f68ec33e3506babee03c4df497a7e211220ee
t7519: rewrite sparse index test

The sparse index is tested with the FS Monitor hook and extension since
f8fe49e (fsmonitor: integrate with sparse index, 2021-07-14). This test
was very fragile because it shared an index across sparse and non-sparse
behavior. Since that expansion and contraction could cause the index to
lose its FS Monitor bitmap and token, behavior is fragile to changes in
'git sparse-checkout set'.

Rewrite the test to use two clones of the original repo: full and
sparse. This allows us to also keep the test files (actual, expect,
trace2.txt) out of the repos we are testing with 'git status'.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7519-status-fsmonitor.sh