Q: GVFS (VFSForGit) and Scalar
Tridy opened this issue · 4 comments
Hi.
I wanted to get some clarification, please. I recently started trying out VFSForGit and now I came across Scalar, so I have the following questions:
- Scalar runs on top/uses VFSForGit, so shortly what does Scalar do that VFSForGit is not doing?
- Should I uninstall gvfs before installing Scalar?
- Is there a case when I should be using VFSForGit and not Scalar?
Thank you!
Hi @Tridy! Sorry for the delay in responding.
Scalar runs on top/uses VFSForGit, so shortly what does Scalar do that VFSForGit is not doing?
Scalar does not "use" VFS for Git. Scalar can be considered a hard fork of VFS for Git in that we started with that codebase and deleted all references to a virtual filesystem (#1). There have been several major refactors since then, so Scalar and VFS for Git look very different.
I would say that Scalar does less than VFS for Git. The thing it does that VFS for Git does not do is initialize a repo with git sparse-checkout init --cone
during a scalar clone
and initialize the fsmonitor
hook if facebook/watchman is installed.
Should I uninstall gvfs before installing Scalar?
For now, yes. We are working on a VFS for Git release that uses a recent-enough version of Git that Scalar can also use. Scalar can be more flexible about what version of Git is used (currently, that must be v2.25.0.vfs.1.1
or higher) but VFS for Git needs an exact Git version match.
Is there a case when I should be using VFSForGit and not Scalar?
The example we use for needing VFS for Git and not Scalar is the Windows OS repository. That repository is so large that it is unwieldy to use if every file from the working directory is populated. However, the build system also does not provide an easy way to know which dependencies you need before building a subproject, so git sparse-checkout
is insufficient for reducing the populated size. When both of those things are true, then VFS for Git is a better choice.
In our previous three years of supporting VFS for Git and talking with many possible users, we have not found anyone other than Windows that satisfies both of those conditions. Please give Scalar a try and then switch to VFS for Git only if the sparse-checkout feature is insufficient for your needs.
Thanks, @derrickstolee. I think I understand a little bit better now. I think.
If I would like to have only the latest version of the files, then I need to clone the repository to my local drive with scalar clone
. That will do sort of "Lazy" loading of the files and it will retrieve the history of the files only when it is asked for. Do I understand it right?
If I would like to have only the latest version of the files, then I need to clone the repository to my local drive with
scalar clone
. That will do sort of "Lazy" loading of the files and it will retrieve the history of the files only when it is asked for. Do I understand it right?
Yes, this will happen with a scalar clone
against Azure Repos or GitHub.com. The difference is that Azure Repos will use the GVFS protocol while a GitHub.com repo will use Git's partial clone. As other Git hosts start supporting partial clone, scalar clone
will work for that, too.
The thing to keep in mind is that files will be downloaded dynamically as you need them in other commands, including git checkout
, git log -p
, git rebase
, etc. Keep that in mind whenever you may need to go offline.
ok, I give it a try. Thanks!