]> git.ipfire.org Git - thirdparty/git.git/blame - fsmonitor-settings.h
t7510: add a test case that does not need gpg
[thirdparty/git.git] / fsmonitor-settings.h
CommitLineData
1e0ea5c4
JH
1#ifndef FSMONITOR_SETTINGS_H
2#define FSMONITOR_SETTINGS_H
3
4struct repository;
5
6enum fsmonitor_mode {
62a62a28 7 FSMONITOR_MODE_INCOMPATIBLE = -1, /* see _reason */
1e0ea5c4
JH
8 FSMONITOR_MODE_DISABLED = 0,
9 FSMONITOR_MODE_HOOK = 1, /* core.fsmonitor=<hook_path> */
10 FSMONITOR_MODE_IPC = 2, /* core.fsmonitor=<true> */
11};
12
62a62a28
JH
13/*
14 * Incompatibility reasons.
15 */
16enum fsmonitor_reason {
17 FSMONITOR_REASON_UNTESTED = 0,
18 FSMONITOR_REASON_OK, /* no incompatibility or when disabled */
19 FSMONITOR_REASON_BARE,
1e7be10d
JH
20 FSMONITOR_REASON_ERROR, /* FS error probing for compatibility */
21 FSMONITOR_REASON_REMOTE,
5c58fbd2 22 FSMONITOR_REASON_VFS4GIT, /* VFS for Git virtualization */
ddc5dacf 23 FSMONITOR_REASON_NOSOCKETS, /* NTFS,FAT32 do not support Unix sockets */
62a62a28
JH
24};
25
1e0ea5c4
JH
26void fsm_settings__set_ipc(struct repository *r);
27void fsm_settings__set_hook(struct repository *r, const char *path);
28void fsm_settings__set_disabled(struct repository *r);
62a62a28
JH
29void fsm_settings__set_incompatible(struct repository *r,
30 enum fsmonitor_reason reason);
1e0ea5c4
JH
31
32enum fsmonitor_mode fsm_settings__get_mode(struct repository *r);
33const char *fsm_settings__get_hook_path(struct repository *r);
34
62a62a28 35enum fsmonitor_reason fsm_settings__get_reason(struct repository *r);
25c2cab0 36char *fsm_settings__get_incompatible_msg(struct repository *r,
62a62a28
JH
37 enum fsmonitor_reason reason);
38
1e0ea5c4
JH
39struct fsmonitor_settings;
40
d33c804d
JH
41#ifdef HAVE_FSMONITOR_OS_SETTINGS
42/*
43 * Ask platform-specific code whether the repository is incompatible
44 * with fsmonitor (both hook and ipc modes). For example, if the working
45 * directory is on a remote volume and mounted via a technology that does
46 * not support notification events, then we should not pretend to watch it.
47 *
48 * fsm_os__* routines should considered private to fsm_settings__
49 * routines.
50 */
8f449768 51enum fsmonitor_reason fsm_os__incompatible(struct repository *r, int ipc);
d33c804d
JH
52#endif /* HAVE_FSMONITOR_OS_SETTINGS */
53
1e0ea5c4 54#endif /* FSMONITOR_SETTINGS_H */