fsmonitor-settings: stub in Win32-specific incompatibility checking

Extend generic incompatibility checkout with platform-specific
mechanism.  Stub in Win32 version.

In the existing fsmonitor-settings code we have a way to mark
types of repos as incompatible with fsmonitor (whether via the
hook and IPC APIs).  For example, we do this for bare repos,
since there are no files to watch.

Extend this exclusion mechanism for platform-specific reasons.
This commit just creates the framework and adds a stub for Win32.

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:46:59 +00:00
committed by Junio C Hamano
parent 62a62a2830
commit d33c804dae
6 changed files with 52 additions and 0 deletions

View File

@ -23,6 +23,16 @@ static enum fsmonitor_reason check_for_incompatible(struct repository *r)
return FSMONITOR_REASON_BARE;
}
#ifdef HAVE_FSMONITOR_OS_SETTINGS
{
enum fsmonitor_reason reason;
reason = fsm_os__incompatible(r);
if (reason != FSMONITOR_REASON_OK)
return reason;
}
#endif
return FSMONITOR_REASON_OK;
}