Skip to content

Commit cc58341

Browse files
authored
Merge pull request #3236 from dscho/no-fsmonitor-in-bare-repos
fsmonitor: only enable it in non-bare repositories
2 parents 5926ea1 + 959c1eb commit cc58341

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,12 @@ int git_config_get_max_percent_split_change(void)
25192519

25202520
int repo_config_get_fsmonitor(struct repository *r)
25212521
{
2522+
if (!r->worktree) {
2523+
/* FSMonitor makes no sense in bare repositories */
2524+
core_fsmonitor = NULL;
2525+
return 1;
2526+
}
2527+
25222528
if (r->settings.use_builtin_fsmonitor > 0) {
25232529
core_fsmonitor = "(built-in daemon)";
25242530
return 1;

0 commit comments

Comments
 (0)