[PATCH 0/2] Fix fsmonitor after discard_index()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It was reported by Ævar Arnfjörð Bjarmason
[https://public-inbox.org/git/nycvar.QRO.7.76.6.1903142058130.41@xxxxxxxxxxxxxxxxx/T/#mb8718fe52e4721dacd3b143a09187ff9090ef4e3] 
that there were problems with the fsmonitor feature in conjunction with the
newly built-in git stash/git rebase.

The culprit really is that the fsmonitor flag that says whether it was
queried already was not re-set after discard_index() was called by mistake.

This fixes that, and apparently also other long-standing fsmonitor issues.

(Note that there is still a flakiness around t7519
[https://github.com/git-for-windows/git/pull/2127#pullrequestreview-215010574] 
where it tries to make sure that the fsmonitor hook can prevent unnecessary
lstat() calls, but that seems to be unrelated to this here bug.)

Johannes Schindelin (2):
  fsmonitor: demonstrate that it is not refreshed after discard_index()
  fsmonitor: force a refresh after the index was discarded

 cache.h                     |  3 ++-
 fsmonitor.c                 |  5 ++---
 read-cache.c                |  1 +
 t/helper/test-read-cache.c  | 24 +++++++++++++++++++++++-
 t/t7519-status-fsmonitor.sh | 10 ++++++++++
 5 files changed, 38 insertions(+), 5 deletions(-)


base-commit: e902e9bcae2010bc42648c80ab6adc6c5a16a4a5
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-165%2Fdscho%2Ffix-fsmonitor-after-discard-index-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-165/dscho/fix-fsmonitor-after-discard-index-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/165
-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux