Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
t7519: add sparse directories to FS monitor tests
The File System Monitor (FS Monitor) tests in t7519 demonstrate some important interactions with the index and the response from the FS Monitor hook. Later changes will integrate the FS Monitor extension in the index with the existence of sparse directory entries in a sparse index. To do so, we need to include directories outside of the sparse checkout definition. Add a new directory, dir1a, between dir1 and dir2 in the test repo used by this script. By inserting it in the middle, we are more likely to trigger incorrect behavior when the fsmonitor_dirty bitmap is involved with sparse directories changing the position of cache entries. I could have modified the test to create two repos, one sparse and one not, but that causes confusion in the expected output. Further, it makes the test take twice as long. With this approach, we can validate that FS Monitor works with the sparse index feature using the GIT_TEST_SPARSE_INDEX=1 environment variable. Of course, we can't do that until 'git update-index' stops expanding a sparse-index into a full index. This is because the FS Monitor bitmap and other data is cleared entirely when the index is converted between modes. When we later integrate 'git update-index' with the sparse-index, then we can update this test to be more informative. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
- Loading branch information