Skip to content

GVFSVerb: use flags for core.gvfs#1622

Merged
derrickstolee merged 1 commit intomicrosoft:masterfrom
derrickstolee:vfs-update-core-gvfs-flags
Dec 19, 2019
Merged

GVFSVerb: use flags for core.gvfs#1622
derrickstolee merged 1 commit intomicrosoft:masterfrom
derrickstolee:vfs-update-core-gvfs-flags

Conversation

@derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented Dec 18, 2019

The core.gvfs config option can take a boolen "true" to turn on
all options, but also an integer to show a bitmask of important
flags. For the first time, we have a new flag that we may not
want to enable right away: GVFS_PREFETCH_DURING_FETCH.

This flag will make the git fetch builtin run a git gvfs-helper prefetch
command. Until that hardens a bit, we do not want VFS for Git users
to use that code path.

Update Git to include this option.

The core.gvfs config option can take a boolen "true" to turn on
all options, but also an integer to show a bitmask of important
flags. For the first time, we have a new flag that we may not
want to enable right away: GVFS_PREFETCH_DURING_FETCH.

This flag will make the `git fetch` builtin run a `git gvfs-helper
prefetch` command. Until that hardens a bit, we do not want VFS
for Git users to use that code path.

Update Git to include this option.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@jeffhostetler
Copy link

jeffhostetler commented Dec 18, 2019

@derrickstolee @jrbriggs I should have asked this question yesterday, but when I added gvfs-helper, I added explicit config settings gvfs.cache-server and gvfs.sharedcache and core.usegvfshelper. Would it be better to set/unset this prefetch-during-fetch flag via a similar core.* or gvfs.* setting -- rather than setting it via another bit in core.gvfs ???

That would avoid the need to change true==all meaning here.

@derrickstolee
Copy link
Contributor Author

@derrickstolee @jrbriggs I should have asked this question yesterday, but when I added gvfs-helper, I added explicit config settings gvfs.cache-server and gvfs.sharedcache and core.usegvfshelper. Would it be better to set/unset this prefetch-during-fetch flag via a similar core.* or gvfs.* setting -- rather than setting it via another bit in core.gvfs ???

I think there is value in making the prefetch-in-fetch work in VFS for Git eventually, as well as dropping the read-object hook in favor of your gvfs-helper.

The only thing I can thing is that core.usegvfshelper could become a flag in core.gvfs. Your gvfs.cache-server and gvfs.sharedcache don't make sense as they are string-valued.

derrickstolee added a commit to microsoft/scalar that referenced this pull request Dec 19, 2019
Update the core.gvfs config to include the flag for running prefetch
during the fetch command.

Resolves #141 and #253.

A related response is posted in microsoft/VFSForGit#1622.
@derrickstolee derrickstolee merged commit 0be7a3b into microsoft:master Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants