[PATCH 2/3] In t7519, populate untracked cache before test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tao Klerks <tao@xxxxxxxxxx>

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.

We 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 <tao@xxxxxxxxxx>
---
 t/t7519-status-fsmonitor.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index 1209fa93499..ef75c548d90 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -339,6 +339,7 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
 		avoid_racy &&
 		git update-index --untracked-cache &&
 		git update-index --fsmonitor &&
+		git status &&
 		GIT_TRACE2_PERF="$TRASH_DIRECTORY/trace-before" \
 		git status &&
 		test-tool dump-untracked-cache >../before
-- 
gitgitgadget




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux