diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2022-05-27 00:46:59 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-27 01:59:26 +0300 |
commit | d33c804daec8aaf1e8af187c00166ef4cb017262 (patch) | |
tree | ee9a0c31535c694e78d3d24e5bbb597ca1bf159a /fsmonitor-settings.h | |
parent | 62a62a28308453ee830bb7e02cf732474a6e01a5 (diff) |
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>
Diffstat (limited to 'fsmonitor-settings.h')
-rw-r--r-- | fsmonitor-settings.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fsmonitor-settings.h b/fsmonitor-settings.h index 8d9331c0c0..6cb0d8e7d9 100644 --- a/fsmonitor-settings.h +++ b/fsmonitor-settings.h @@ -34,4 +34,17 @@ char *fsm_settings__get_incompatible_msg(const struct repository *r, struct fsmonitor_settings; +#ifdef HAVE_FSMONITOR_OS_SETTINGS +/* + * Ask platform-specific code whether the repository is incompatible + * with fsmonitor (both hook and ipc modes). For example, if the working + * directory is on a remote volume and mounted via a technology that does + * not support notification events, then we should not pretend to watch it. + * + * fsm_os__* routines should considered private to fsm_settings__ + * routines. + */ +enum fsmonitor_reason fsm_os__incompatible(struct repository *r); +#endif /* HAVE_FSMONITOR_OS_SETTINGS */ + #endif /* FSMONITOR_SETTINGS_H */ |