summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-05 20:52:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-05 20:52:48 (GMT)
commit473b431410f5dbaa0c6a7bcc1e49b73c505cfe89 (patch)
treebe799d4c6990b21611e20e2bbc4a6104fbb423d9 /t
parente0f9ec90278ec989ac7840a69f42a414f0db23f5 (diff)
parent679f2f9fdd2173d87251aee357dd0e46ce977f42 (diff)
downloadgit-473b431410f5dbaa0c6a7bcc1e49b73c505cfe89.zip
git-473b431410f5dbaa0c6a7bcc1e49b73c505cfe89.tar.gz
git-473b431410f5dbaa0c6a7bcc1e49b73c505cfe89.tar.bz2
Merge branch 'us/unpack-trees-fsmonitor'
Users of oneway_merge() (like "reset --hard") learned to take advantage of fsmonitor to avoid unnecessary lstat(2) calls. * us/unpack-trees-fsmonitor: unpack-trees: skip stat on fsmonitor-valid files
Diffstat (limited to 't')
-rwxr-xr-xt/t7519-status-fsmonitor.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index 1e47ed2..cf0fda2 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -106,6 +106,8 @@ EOF
# test that "update-index --fsmonitor-valid" sets the fsmonitor valid bit
test_expect_success 'update-index --fsmonitor-valid" sets the fsmonitor valid bit' '
+ write_script .git/hooks/fsmonitor-test<<-\EOF &&
+ EOF
git update-index --fsmonitor &&
git update-index --fsmonitor-valid dir1/modified &&
git update-index --fsmonitor-valid dir2/modified &&
@@ -164,6 +166,8 @@ EOF
# test that newly added files are marked valid
test_expect_success 'newly added files are marked valid' '
+ write_script .git/hooks/fsmonitor-test<<-\EOF &&
+ EOF
git add new &&
git add dir1/new &&
git add dir2/new &&
@@ -218,11 +222,12 @@ test_expect_success '*only* files returned by the integration script get flagged
# Ensure commands that call refresh_index() to move the index back in time
# properly invalidate the fsmonitor cache
test_expect_success 'refresh_index() invalidates fsmonitor cache' '
- write_script .git/hooks/fsmonitor-test<<-\EOF &&
- EOF
clean_repo &&
dirty_repo &&
+ write_integration_script &&
git add . &&
+ write_script .git/hooks/fsmonitor-test<<-\EOF &&
+ EOF
git commit -m "to reset" &&
git reset HEAD~1 &&
git status >actual &&