On 2/15/2022 10:59 AM, Jeff Hostetler via GitGitGadget wrote: > From: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx> > > Virtual repos, such as GVFS (aka VFS for Git), are incompatible > with FSMonitor. I would swap all of your "GVFS (aka VFS for Git)" for just "VFS for Git". > +/* > + * GVFS (aka VFS for Git) is incompatible with FSMonitor. > + * > + * Granted, core Git does not know anything about GVFS and we > + * shouldn't make assumptions about a downstream feature, but users > + * can install both versions. And this can lead to incorrect results > + * from core Git commands. So, without bringing in any of the GVFS > + * code, do a simple config test for a published config setting. (We > + * do not look at the various *_TEST_* environment variables.) > + */ > +static enum fsmonitor_reason is_virtual(struct repository *r) > +{ > + const char *const_str; > + > + if (!repo_config_get_value(r, "core.virtualfilesystem", &const_str)) > + return FSMONITOR_REASON_VIRTUAL; > + > + return FSMONITOR_REASON_ZERO; > +} This reason seems to be specific to a config setting that only exists in the microsoft/git fork. Perhaps this patch should remain there. However, there is also the discussion of vfsd going on, so something similar might be necessary for that system. Junio also mentioned wanting to collaborate on a common indicator that virtualization was being used, so maybe we _should_ make core.virtualFilesystem a config setting in the core Git project. The reason for the incompatibility here is that VFS for Git has its own filesystem watcher and Git gets updates from it via custom code that is a precursor to this FS Monitor feature. I don't know if vfsd has plans for a similar setup. (It would probably be best to fit into the FS Monitor client/server model and use a different daemon for those virtualized repos, but I don't know enough details to be sure.) CC'ing Jonathan Nieder for thoughts on this. Thanks, -Stolee