Skip to content

Commit 37482b4

Browse files
TaoKgitster
authored andcommitted
t7519: populate untracked cache before test
In its current state, the t7519 test dealing with untracked cache assumes that "git update-index --untracked-cache" will *populate* the untracked cache. This is not correct - it will only add an empty untracked cache structure to the index. If we're going to compare two git status runs with something interesting happening in-between, we need to ensure that the index is in a stable/steady state *before* that first run. Achieve this by adding another prior "git status" run. At this stage this change does nothing, because there is a bug, addressed in the next patch, whereby once the empty untracked cache structure is added by the update-index invocation, the untracked cache gets updated in every subsequent "git status" call, but the index with these updates does not get written down. That bug actually invalidates this entire test case - but we're fixing that next. Signed-off-by: Tao Klerks <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a67d178 commit 37482b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t7519-status-fsmonitor.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
341341
git config core.fsmonitor .git/hooks/fsmonitor-test &&
342342
git update-index --untracked-cache &&
343343
git update-index --fsmonitor &&
344+
git status &&
344345
GIT_TRACE2_PERF="$TRASH_DIRECTORY/trace-before" \
345346
git status &&
346347
test-tool dump-untracked-cache >../before

0 commit comments

Comments
 (0)