Repository navigation
Sparse-index preview 1 (microsoft/git#1024-#1028, unsigned)
Pre-releaseWarning
This is a temporary, unsigned preview build for the review of the VFS for Git sparse-index pull requests. It is not a microsoft/git release. Install it only on a test machine.
What this build contains
microsoft/git vfs-2.56.1 (a6974a1ce8) plus these pull requests, in merge order:
| PR | Change |
|---|---|
| microsoft#1027 | The name-hash finds entries that expand_index() reuses |
| microsoft#1025 | A cone-mode sparse index under a virtual file system (opt-in: index.sparse=true) |
| microsoft#1028 | update_sparsity() changes only the index under a virtual file system |
| microsoft#1024 | No index expansion during the working-tree walk under a virtual file system |
| microsoft#1026 | git version --build-options reports feature: vfs-sparse-index |
- Source: branch
sparse-index/previewat55f945ac23(the head of microsoft#1026, which contains all five PRs). - Binaries: the
MicrosoftGitartifact of the microsoft/git CI run 44134609589. That run built the merge of55f945ac23intovfs-2.56.1(6f9a6407). The tree is the same as55f945ac23. git versionreports2.56.1.vfs.0.0.NNN.g6f9a640. TheNNNis a CI placeholder.- The x64 build passed the VFS for Git functional tests in that run. The arm64 functional shards of microsoft/git fail before and after these changes, so the arm64 build has less test evidence.
| Asset | SHA-256 |
|---|---|
microsoft-git-sparse-index-preview-1-x64.zip |
A49F60686492CB7F73B24DBFDB21D2382370D8E543446983B1220342FB2DF246 |
microsoft-git-sparse-index-preview-1-arm64.zip |
7A86E27B4633401C6FE4DBE515BA3C33F7B47FB213F7C9E92979E7BAD5E24C6B |
Install
The zip is an overlay. It replaces the binaries of an installed microsoft/git. VFS for Git finds git only through the registry, and the VFS for Git functional tests use C:\Program Files\Git. Thus the preview must replace the system git.
-
Install microsoft/git
v2.56.1.vfs.0.1with its installer, if it is not installed. -
Download the zip for your CPU, and check its SHA-256 (
Get-FileHash <zip>). -
Extract the zip to a folder, for example
C:\temp\git-preview. -
Close every process that uses git (editors, terminals, and
GVFS.Mount.exe: rungvfs unmountfor each enlistment). -
In an elevated PowerShell, run:
robocopy C:\temp\git-preview "C:\Program Files\Git" /E /NFL /NDL /NJH /NJS
A robocopy exit code below 8 is a success.
-
Make sure that the preview is active:
git version --build-options | Select-String 'version|feature: vfs-sparse-index'
The output must have
feature: vfs-sparse-index.
Remove
Run the v2.56.1.vfs.0.1 installer again. If the installer refuses, run it with /ALLOWDOWNGRADE=1. Then make sure that git version --build-options does not have feature: vfs-sparse-index.
Run the VFS for Git tests of the sparse-index pull requests
The AutoSparseIndex functional tests run only when the installed git reports feature: vfs-sparse-index. VFS for Git CI uses a released git without it, so CI skips these tests. With the preview installed, they run.
-
Check out the branch of the pull request that you review, in a VFS for Git clone. The stack is microsoft/VFSForGit#2193, git-for-windows#2190, git-for-windows#2192, git-for-windows#2196, git-for-windows#2197, git-for-windows#2200, and git-for-windows#2202, bottom to top.
-
Build it with
scripts\Build.bat(Debug, x64), asReadme.mdsays. -
In an elevated PowerShell, run the fixtures. This example names the fixtures of the top of the stack. A lower PR has only some of them, and its description names them.
.\scripts\RunFunctionalTests-Dev.ps1 -Configuration Debug ` --test=GVFS.FunctionalTests.Tests.EnlistmentPerFixture.AutoSparseIndexConeTests ` --test=GVFS.FunctionalTests.Tests.EnlistmentPerFixture.AutoSparseIndexWorkingTreeTests ` --test=GVFS.FunctionalTests.Tests.EnlistmentPerFixture.ConeManagementHookTests ` --test=GVFS.FunctionalTests.Tests.EnlistmentPerTestCase.SparseIndexMountTests
-
Make sure that the tests ran: the result must show them as passed, not as ignored. An ignored AutoSparseIndex test means that the installed git does not report
feature: vfs-sparse-index.
To use the feature by hand in a test enlistment, set git config gvfs.auto-sparse-index true and mount again. The later PRs of the stack add the gvfs sparse-index verb.
Build from source
- Install the Git for Windows SDK (
git-sdk-64). - In the SDK's bash, clone
https://github.com/tyrielv/microsoft-git, and check outsparse-index/preview. - Run
make -j$(nproc) DEVELOPER=1. Then runmake test T="t1093-*.sh t1094-*.sh t1095-*.sh t1096-*.sh t1097-*.sh t1098-*.sh"for the tests of these PRs. - To make an overlay like the zip, follow the "Build Git" job in
.github/workflows/vfs-functional-tests.ymlon the same branch. It installs to apayloadfolder and copies the DLLs that the binaries need.
This preview changes when the pull requests change. A new preview gets a new tag (sparse-index-preview-2, and so on). The tag and this release will be deleted after the pull requests merge and a microsoft/git release contains them.