File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
#include "cache.h"
2
+ #include "config.h"
2
3
#include "fsmonitor.h"
3
4
#include "simple-ipc.h"
4
5
#include "fsmonitor-ipc.h"
10
11
11
12
int fsmonitor_ipc__is_supported (void )
12
13
{
14
+ if (git_config_get_virtualfilesystem ())
15
+ return 0 ;
13
16
return 1 ;
14
17
}
15
18
Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ static void lookup_fsmonitor_settings(struct repository *r)
127
127
128
128
enum fsmonitor_mode fsm_settings__get_mode (struct repository * r )
129
129
{
130
+ if (git_config_get_virtualfilesystem ())
131
+ return FSMONITOR_MODE_INCOMPATIBLE ;
132
+
130
133
if (!r -> settings .fsmonitor )
131
134
lookup_fsmonitor_settings (r );
132
135
Original file line number Diff line number Diff line change @@ -368,4 +368,15 @@ test_expect_success 'folder with same prefix as file' '
368
368
test_cmp expected actual
369
369
'
370
370
371
+ test_expect_success ' virtualfilsystem hook disables built-in FSMonitor ' '
372
+ clean_repo &&
373
+ test_config core.usebuiltinfsmonitor true &&
374
+ write_script .git/hooks/virtualfilesystem <<-\EOF &&
375
+ printf "dir1/\0"
376
+ EOF
377
+ git config core.virtualfilesystem .git/hooks/virtualfilesystem &&
378
+ git status &&
379
+ test_must_fail git fsmonitor--daemon status
380
+ '
381
+
371
382
test_done
You can’t perform that action at this time.
0 commit comments