Skip to content

Commit

Permalink
Merge pull request #3236 from dscho/no-fsmonitor-in-bare-repos
Browse files Browse the repository at this point in the history
fsmonitor: only enable it in non-bare repositories
  • Loading branch information
dscho authored and Git for Windows Build Agent committed Jul 28, 2021
2 parents 97ec1e9 + 07fc9f6 commit 3999bb1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2519,6 +2519,12 @@ int git_config_get_max_percent_split_change(void)

int repo_config_get_fsmonitor(struct repository *r)
{
if (!r->worktree) {
/* FSMonitor makes no sense in bare repositories */
core_fsmonitor = NULL;
return 1;
}

if (r->settings.use_builtin_fsmonitor > 0) {
core_fsmonitor = "(built-in daemon)";
return 1;
Expand Down

0 comments on commit 3999bb1

Please sign in to comment.