fsmonitor-settings: bare repos are incompatible with FSMonitor
Bare repos do not have a worktree, so there is nothing for the daemon watch. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
49b398a970
commit
62a62a2830
@ -1237,6 +1237,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 "
|
||||
|
||||
Reference in New Issue
Block a user