| 43 | */ |
| 44 | #ifdef HAVE_FSMONITOR_OS_SETTINGS |
| 45 | static enum fsmonitor_reason check_remote(struct repository *r) |
| 46 | { |
| 47 | int allow_remote = -1; /* -1 unset, 0 not allowed, 1 allowed */ |
| 48 | int is_remote = fsmonitor__is_fs_remote(r->worktree); |
| 49 | |
| 50 | switch (is_remote) { |
| 51 | case 0: |
| 52 | return FSMONITOR_REASON_OK; |
| 53 | case 1: |
| 54 | repo_config_get_bool(r, "fsmonitor.allowremote", &allow_remote); |
| 55 | if (allow_remote < 1) |
| 56 | return FSMONITOR_REASON_REMOTE; |
| 57 | else |
| 58 | return FSMONITOR_REASON_OK; |
| 59 | default: |
| 60 | return FSMONITOR_REASON_ERROR; |
| 61 | } |
| 62 | } |
| 63 | #endif |
| 64 | |
| 65 | static enum fsmonitor_reason check_for_incompatible(struct repository *r, |
no test coverage detected