]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
fsmonitor: force a refresh after the index was discarded
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 7 May 2019 11:10:21 +0000 (13:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 May 2019 03:03:48 +0000 (12:03 +0900)
commit398a3b0899dd8a440d4adbcbda38362e3f8359b1
treee4231bcbe6bc2fa30593292cb34cabf863d7cbf7
parentdc76852df2f7bc5a6c79a796954a81f5af284c34
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>
cache.h
fsmonitor.c
read-cache.c
t/t7519-status-fsmonitor.sh