summaryrefslogtreecommitdiff
path: root/fsmonitor-settings.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2022-05-26 21:47:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-05-26 22:59:26 (GMT)
commit1e7be10de0d493f471bf102a7eed32da8247c825 (patch)
tree7fd066b9c61fc633c46b15812f12b77a3422efef /fsmonitor-settings.c
parenta85ad67bbdadb24ddb9b58a4010e20105c4c25e9 (diff)
downloadgit-1e7be10de0d493f471bf102a7eed32da8247c825.zip
git-1e7be10de0d493f471bf102a7eed32da8247c825.tar.gz
git-1e7be10de0d493f471bf102a7eed32da8247c825.tar.bz2
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>
Diffstat (limited to 'fsmonitor-settings.c')
-rw-r--r--fsmonitor-settings.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fsmonitor-settings.c b/fsmonitor-settings.c
index 600ae16..d2fb014 100644
--- a/fsmonitor-settings.c
+++ b/fsmonitor-settings.c
@@ -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"),