summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-03-16 17:53:07 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-16 17:53:07 -0700
commit47e0380289b4d60c6fc6a86935686233113aa001 (patch)
tree3fcd15ff026f0dea31ce972a8546b8387ac406a7 /t
parentMerge branch 'ab/grep-patterntype' (diff)
parentuntracked-cache: write index when populating empty untracked cache (diff)
downloadtgif-47e0380289b4d60c6fc6a86935686233113aa001.tar.xz
Merge branch 'tk/empty-untracked-cache'
The untracked cache newly computed weren't written back to the on-disk index file when there is no other change to the index, which has been corrected. * tk/empty-untracked-cache: untracked-cache: write index when populating empty untracked cache t7519: populate untracked cache before test t7519: avoid file to index mtime race for untracked cache
Diffstat (limited to 't')
-rwxr-xr-xt/t7519-status-fsmonitor.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index a6308acf00..fffc57120d 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -324,17 +324,24 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
cd dot-git &&
mkdir -p .git/hooks &&
: >tracked &&
+ test-tool chmtime =-60 tracked &&
: >modified &&
+ test-tool chmtime =-60 modified &&
mkdir dir1 &&
: >dir1/tracked &&
+ test-tool chmtime =-60 dir1/tracked &&
: >dir1/modified &&
+ test-tool chmtime =-60 dir1/modified &&
mkdir dir2 &&
: >dir2/tracked &&
+ test-tool chmtime =-60 dir2/tracked &&
: >dir2/modified &&
+ test-tool chmtime =-60 dir2/modified &&
write_integration_script &&
git config core.fsmonitor .git/hooks/fsmonitor-test &&
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