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>
This commit is contained in:
Eric DeCosta
2022-10-04 17:32:28 +00:00
committed by Junio C Hamano
parent 6beb2688d3
commit 8f44976882
4 changed files with 12 additions and 10 deletions

View File

@ -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;
}