Skip to content

pr-942/dscho/bare-repositories-need-no-fsmonitor-v1

From: Johannes Schindelin <johannes.schindelin@gmx.de>

The entire point of the FSMonitor is to monitor the worktree changes in
a more efficient manner than `lstat()`ing all worktree files every time
we refresh the index.

But if there is no worktree, FSMonitor has nothing to monitor.

So let's ignore if an FSMonitor is configured (e.g. in `~/.gitconfig`)
and we're running in a repository without worktree.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Submitted-As: https://lore.kernel.org/git/pull.942.git.1619682362363.gitgitgadget@gmail.com
Assets 2