summaryrefslogtreecommitdiff
path: root/compat/fsmonitor
diff options
context:
space:
mode:
authorEric DeCosta <edecosta@mathworks.com>2022-10-04 17:32:28 +0000
committerJunio C Hamano <gitster@pobox.com>2022-10-05 11:05:23 -0700
commit8f44976882b77bb3b9ac0579a04ef05cbea5bdb2 (patch)
tree9f9d1e59ac4f7a90330d4d5eb142a8abd7e4354a /compat/fsmonitor
parent6beb2688d33373508610b190f04721e748caa12c (diff)
downloadgit-8f44976882b77bb3b9ac0579a04ef05cbea5bdb2.tar.gz
fsmonitor: avoid socket location check if using hook
If monitoring is done via fsmonitor hook rather than IPC there is no need to check if the location of the Unix Domain socket (UDS) file is on a remote filesystem. Signed-off-by: Eric DeCosta <edecosta@mathworks.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/fsmonitor')
-rw-r--r--compat/fsmonitor/fsm-settings-darwin.c10
-rw-r--r--compat/fsmonitor/fsm-settings-win32.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/compat/fsmonitor/fsm-settings-darwin.c b/compat/fsmonitor/fsm-settings-darwin.c
index 7241c4c22c..6abbc7af3a 100644
--- a/compat/fsmonitor/fsm-settings-darwin.c
+++ b/compat/fsmonitor/fsm-settings-darwin.c
@@ -48,13 +48,15 @@ static enum fsmonitor_reason check_uds_volume(struct repository *r)
return FSMONITOR_REASON_OK;
}
-enum fsmonitor_reason fsm_os__incompatible(struct repository *r)
+enum fsmonitor_reason fsm_os__incompatible(struct repository *r, int ipc)
{
enum fsmonitor_reason reason;
- reason = check_uds_volume(r);
- if (reason != FSMONITOR_REASON_OK)
- return reason;
+ if (ipc) {
+ reason = check_uds_volume(r);
+ if (reason != FSMONITOR_REASON_OK)
+ return reason;
+ }
return FSMONITOR_REASON_OK;
}
diff --git a/compat/fsmonitor/fsm-settings-win32.c b/compat/fsmonitor/fsm-settings-win32.c
index d88b06ae61..a8af31b71d 100644
--- a/compat/fsmonitor/fsm-settings-win32.c
+++ b/compat/fsmonitor/fsm-settings-win32.c
@@ -25,7 +25,7 @@ static enum fsmonitor_reason check_vfs4git(struct repository *r)
return FSMONITOR_REASON_OK;
}
-enum fsmonitor_reason fsm_os__incompatible(struct repository *r)
+enum fsmonitor_reason fsm_os__incompatible(struct repository *r, int ipc)
{
enum fsmonitor_reason reason;