#include "git-compat-util.h"
#include "config.h"
#include "gettext.h"
#include "repository.h"
#include "fsmonitor-ipc.h"
#include "fsmonitor-settings.h"
#include "fsmonitor-path-utils.h"
struct fsmonitor_settings { … };
#ifdef HAVE_FSMONITOR_OS_SETTINGS
static enum fsmonitor_reason check_remote(struct repository *r)
{
int allow_remote = -1;
int is_remote = fsmonitor__is_fs_remote(r->worktree);
switch (is_remote) {
case 0:
return FSMONITOR_REASON_OK;
case 1:
repo_config_get_bool(r, "fsmonitor.allowremote", &allow_remote);
if (allow_remote < 1)
return FSMONITOR_REASON_REMOTE;
else
return FSMONITOR_REASON_OK;
default:
return FSMONITOR_REASON_ERROR;
}
}
#endif
static enum fsmonitor_reason check_for_incompatible(struct repository *r,
int ipc MAYBE_UNUSED)
{ … }
static struct fsmonitor_settings *alloc_settings(void)
{ … }
static void lookup_fsmonitor_settings(struct repository *r)
{ … }
enum fsmonitor_mode fsm_settings__get_mode(struct repository *r)
{ … }
const char *fsm_settings__get_hook_path(struct repository *r)
{ … }
void fsm_settings__set_ipc(struct repository *r)
{ … }
void fsm_settings__set_hook(struct repository *r, const char *path)
{ … }
void fsm_settings__set_disabled(struct repository *r)
{ … }
void fsm_settings__set_incompatible(struct repository *r,
enum fsmonitor_reason reason)
{ … }
enum fsmonitor_reason fsm_settings__get_reason(struct repository *r)
{ … }
char *fsm_settings__get_incompatible_msg(struct repository *r,
enum fsmonitor_reason reason)
{ … }