Skip to content

Commit

Permalink
Merge pull request #379 from dscho/disable-fsmonitor-with-gvfs
Browse files Browse the repository at this point in the history
vfs: disable the built-in FSMonitor
  • Loading branch information
dscho authored and derrickstolee committed Aug 3, 2021
2 parents ff1fddf + 45a8afa commit e4b73fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repo-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ void prepare_repo_settings(struct repository *r)
r->settings.core_multi_pack_index = value;
UPDATE_DEFAULT_BOOL(r->settings.core_multi_pack_index, 1);

if (!repo_config_get_bool(r, "core.usebuiltinfsmonitor", &value) && value)
if (!git_config_get_virtualfilesystem() &&
!repo_config_get_bool(r, "core.usebuiltinfsmonitor", &value) && value)
r->settings.use_builtin_fsmonitor = 1;

if (!repo_config_get_bool(r, "feature.manyfiles", &value) && value) {
Expand Down
10 changes: 10 additions & 0 deletions t/t1093-virtualfilesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,14 @@ test_expect_success 'folder with same prefix as file' '
test_cmp expected actual
'

test_expect_success 'virtualfilsystem hook disables built-in FSMonitor ' '
clean_repo &&
test_config core.usebuiltinfsmonitor true &&
write_script .git/hooks/virtualfilesystem <<-\EOF &&
printf "dir1/\0"
EOF
git status &&
test_must_fail git fsmonitor--daemon status
'

test_done

0 comments on commit e4b73fa

Please sign in to comment.