Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric DeCosta <edecosta@mathworks.com>2022-10-04 20:32:28 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-05 21:05:23 +0300
commit8f44976882b77bb3b9ac0579a04ef05cbea5bdb2 (patch)
tree9f9d1e59ac4f7a90330d4d5eb142a8abd7e4354a /fsmonitor-settings.c
parent6beb2688d33373508610b190f04721e748caa12c (diff)
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 'fsmonitor-settings.c')
-rw-r--r--fsmonitor-settings.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fsmonitor-settings.c b/fsmonitor-settings.c
index d288cbad47..531a1b6f95 100644
--- a/fsmonitor-settings.c
+++ b/fsmonitor-settings.c
@@ -60,7 +60,7 @@ static enum fsmonitor_reason check_remote(struct repository *r)
}
#endif
-static enum fsmonitor_reason check_for_incompatible(struct repository *r)
+static enum fsmonitor_reason check_for_incompatible(struct repository *r, int ipc)
{
if (!r->worktree) {
/*
@@ -77,7 +77,7 @@ static enum fsmonitor_reason check_for_incompatible(struct repository *r)
reason = check_remote(r);
if (reason != FSMONITOR_REASON_OK)
return reason;
- reason = fsm_os__incompatible(r);
+ reason = fsm_os__incompatible(r, ipc);
if (reason != FSMONITOR_REASON_OK)
return reason;
}
@@ -162,7 +162,7 @@ const char *fsm_settings__get_hook_path(struct repository *r)
void fsm_settings__set_ipc(struct repository *r)
{
- enum fsmonitor_reason reason = check_for_incompatible(r);
+ enum fsmonitor_reason reason = check_for_incompatible(r, 1);
if (reason != FSMONITOR_REASON_OK) {
fsm_settings__set_incompatible(r, reason);
@@ -185,7 +185,7 @@ void fsm_settings__set_ipc(struct repository *r)
void fsm_settings__set_hook(struct repository *r, const char *path)
{
- enum fsmonitor_reason reason = check_for_incompatible(r);
+ enum fsmonitor_reason reason = check_for_incompatible(r, 0);
if (reason != FSMONITOR_REASON_OK) {
fsm_settings__set_incompatible(r, reason);