summaryrefslogtreecommitdiff
path: root/t/t7519-status-fsmonitor.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-05-19 16:45:33 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-05-19 16:45:33 +0900
commitcfd635c7428dfca5b45d8d45fdc1311e751d4fe2 (patch)
tree3bd1754e72887659e52ee03342a4a9098fe9c247 /t/t7519-status-fsmonitor.sh
parentMerge branch 'cm/notes-comment-fix' (diff)
parentfsmonitor: force a refresh after the index was discarded (diff)
downloadtgif-cfd635c7428dfca5b45d8d45fdc1311e751d4fe2.tar.xz
Merge branch 'js/fsmonitor-refresh-after-discarding-index'
The fsmonitor interface got out of sync after the in-core index file gets discarded, which has been corrected. * js/fsmonitor-refresh-after-discarding-index: fsmonitor: force a refresh after the index was discarded fsmonitor: demonstrate that it is not refreshed after discard_index()
Diffstat (limited to 't/t7519-status-fsmonitor.sh')
-rwxr-xr-xt/t7519-status-fsmonitor.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index 3e0a61db23..81a375fa0f 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -346,4 +346,12 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
test_cmp before after
'
+test_expect_success 'discard_index() also discards fsmonitor info' '
+ test_config core.fsmonitor "$TEST_DIRECTORY/t7519/fsmonitor-all" &&
+ test_might_fail git update-index --refresh &&
+ test-tool read-cache --print-and-refresh=tracked 2 >actual &&
+ printf "tracked is%s up to date\n" "" " not" >expect &&
+ test_cmp expect actual
+'
+
test_done