fsmonitor-settings: VFS for Git virtual repos are incompatible

VFS for Git virtual repositories are incompatible with FSMonitor.

VFS for Git is a downstream fork of Git.  It contains its own custom
file system watcher that is aware of the virtualization.  If a working
directory is being managed by VFS for Git, we should not try to watch
it because we may get incomplete results.

We do not know anything about how VFS for Git works, but we do
know that VFS for Git working directories contain a well-defined
config setting.  If it is set, mark the working directory as
incompatible.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff Hostetler
2022-05-26 21:47:00 +00:00
committed by Junio C Hamano
parent d33c804dae
commit 5c58fbd265
4 changed files with 43 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ enum fsmonitor_reason {
FSMONITOR_REASON_UNTESTED = 0,
FSMONITOR_REASON_OK, /* no incompatibility or when disabled */
FSMONITOR_REASON_BARE,
FSMONITOR_REASON_VFS4GIT, /* VFS for Git virtualization */
};
void fsm_settings__set_ipc(struct repository *r);