Open turbonaitis opened 5 years ago
I can attest that it's been handy in our Linux work to avoid functional test errors while we don't have a running GVFS.Service
process yet.
This is because otherwise the functional test suite spots the WARNING: Failed to register for automount
message printed during mounting, but we can (temporarily) disable that on Linux while we lack a GVFS.Service
process by setting GVFS_UNATTENDED
. So that's at least one usage, albeit possibly not the originally intended one.
One problem I see with unattended mode, is that it uses a different local cache path, than attended. https://github.com/microsoft/VFSForGit/blob/c8df6874d5676ec146ef0873baa37f3cf27f9976/GVFS/GVFS.Common/LocalCacheResolver.cs#L29-L36
Also, no git maintenance steps are being scheduled in the GVFS.Mount process, if it's Unattended https://github.com/microsoft/VFSForGit/blob/15dff017754dd41f7f7508331cd2cb237d9dfc53/GVFS/GVFS.Common/Maintenance/GitMaintenanceScheduler.cs#L50-L55
Also, GitStatusCache is disabled for unattended mounts: https://github.com/microsoft/VFSForGit/blob/8c61c1ad051c97545a2dd2b6b0e22fca9b3b7fa1/GVFS/GVFS.Mount/InProcessMount.cs#L545
It would be great to hear what are the intentions for unattended mode - is it for testing, for CI use cases, or for what? @kewillford, perhaps you can shed some light on this?
Bringing this back up: we are using VFS for Git on an unattended build machine to clone and incrementally build source code but it's unclear whether GVFS_UNATTENDED would be appropriate for that use case or not.
I believe that is the point. You use it when you do not expect a user to be at the machine.
Be aware: the variable does things like disables background maintenance.
I've found that code checks if the
GVFS_UNATTENDED
environment variable is set to 1, but there doesn't seem to be any use cases for it, nor any documentation.What is its intended usage?