fsmonitor-settings: remote repos on macOS are incompatible

Teach Git to detect remote working directories on macOS and mark them as
incompatible with FSMonitor.

With this, `git fsmonitor--daemon run` will error out with a message
like it does for bare repos.

Client commands, like `git status`, will not attempt to start the daemon.

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:02 +00:00
committed by Junio C Hamano
parent a85ad67bbd
commit 1e7be10de0
3 changed files with 80 additions and 0 deletions

View File

@@ -208,6 +208,18 @@ char *fsm_settings__get_incompatible_msg(const struct repository *r,
xgetcwd());
goto done;
case FSMONITOR_REASON_ERROR:
strbuf_addf(&msg,
_("repository '%s' is incompatible with fsmonitor due to errors"),
r->worktree);
goto done;
case FSMONITOR_REASON_REMOTE:
strbuf_addf(&msg,
_("remote repository '%s' is incompatible with fsmonitor"),
r->worktree);
goto done;
case FSMONITOR_REASON_VFS4GIT:
strbuf_addf(&msg,
_("virtual repository '%s' is incompatible with fsmonitor"),