MCPcopy Create free account
hub / github.com/git/git / check_remote

Function check_remote

fsmonitor-settings.c:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 */
44#ifdef HAVE_FSMONITOR_OS_SETTINGS
45static 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
65static enum fsmonitor_reason check_for_incompatible(struct repository *r,

Callers 1

check_for_incompatibleFunction · 0.85

Calls 2

repo_config_get_boolFunction · 0.85
fsmonitor__is_fs_remoteFunction · 0.50

Tested by

no test coverage detected