Re: fsmonitor (Linux): edits in subdirectories of a renamed directory are missed
- From
- Erik Cervin Edin <erik@cervined.in>
- Date
- Dec 1, 2026, 18:44 UTC
- Message-ID
- <CA+JQ7M8pE-NrNWRfVB37dQjyWd8W4ZSbZTGRc3fRsYduRusuTA@mail.gmail.com>
- In-Reply-To
- <833d94b8-f313-4717-8e48-48bd35a6ab4f@adamatec.com>
On 01/12/26 13:55, Nicolas Riebesel wrote:
> Until this is fixed, setting core.fsmonitor=false in affected > repositories is the only workaround I am aware of; restarting the > daemon helps only until the next directory rename.
FWIW, I've found core.fsmonitor=false a sane default and only turn it on when it's needed.
git-update-index(1) specifies:
> FILE SYSTEM MONITOR > This feature is intended to speed up git operations for repos > that have large working directories.
I suspect "large" varies by your OS. I can only guess that "large" here means large monolithic style repos, or things like the kernel.
When the fsmonitor hook was introduced, Ben Peart wrote [1]:
> Due to the overhead of calling out to Watchman, on very small repos > (<10K files) the overhead exceeds the savings. Once repos hit 10K files > the savings kick in and for repos beyond that, the savings are dramatic.
[1]: https://lore.kernel.org/git/20170915192043.4516-1-benpeart@microsoft.com/