diff options
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r-- | builtin/update-index.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c index 43c713c087..b62249905f 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -1257,6 +1257,22 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) if (fsmonitor > 0) { enum fsmonitor_mode fsm_mode = fsm_settings__get_mode(r); + enum fsmonitor_reason reason = fsm_settings__get_reason(r); + + /* + * The user wants to turn on FSMonitor using the command + * line argument. (We don't know (or care) whether that + * is the IPC or HOOK version.) + * + * Use one of the __get routines to force load the FSMonitor + * config settings into the repo-settings. That will detect + * whether the file system is compatible so that we can stop + * here with a nice error message. + */ + if (reason > FSMONITOR_REASON_OK) + die("%s", + fsm_settings__get_incompatible_msg(r, reason)); + if (fsm_mode == FSMONITOR_MODE_DISABLED) { warning(_("core.fsmonitor is unset; " "set it if you really want to " |