Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-05-07 14:10:21 +0300
committerJunio C Hamano <gitster@pobox.com>2019-05-08 06:03:48 +0300
commit398a3b0899dd8a440d4adbcbda38362e3f8359b1 (patch)
treee4231bcbe6bc2fa30593292cb34cabf863d7cbf7 /t/t7519-status-fsmonitor.sh
parentdc76852df2f7bc5a6c79a796954a81f5af284c34 (diff)
fsmonitor: force a refresh after the index was discarded
With this change, the `index_state` struct becomes the new home for the flag that says whether the fsmonitor hook has been run, i.e. it is now per-index. It also gets re-set when the index is discarded, fixing the bug demonstrated by the "test_expect_failure" test added in the preceding commit. In that case fsmonitor-enabled Git would miss updates under certain circumstances, see that preceding commit for details. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7519-status-fsmonitor.sh')
-rwxr-xr-xt/t7519-status-fsmonitor.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
index afd8fa7532..81a375fa0f 100755
--- a/t/t7519-status-fsmonitor.sh
+++ b/t/t7519-status-fsmonitor.sh
@@ -346,7 +346,7 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
test_cmp before after
'
-test_expect_failure 'discard_index() also discards fsmonitor info' '
+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 &&