Skip to content

Sparse-index preview 1 (microsoft/git#1024-#1028, unsigned)

Pre-release
Pre-release

Choose a tag to compare

@tyrielv tyrielv released this 18 Nov 17:30

Warning

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/preview at 55f945ac23 (the head of microsoft#1026, which contains all five PRs).
  • Binaries: the MicrosoftGit artifact of the microsoft/git CI run 44134609589. That run built the merge of 55f945ac23 into vfs-2.56.1 (6f9a6407). The tree is the same as 55f945ac23.
  • git version reports 2.56.1.vfs.0.0.NNN.g6f9a640. The NNN is 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.

  1. Install microsoft/git v2.56.1.vfs.0.1 with its installer, if it is not installed.

  2. Download the zip for your CPU, and check its SHA-256 (Get-FileHash <zip>).

  3. Extract the zip to a folder, for example C:\temp\git-preview.

  4. Close every process that uses git (editors, terminals, and GVFS.Mount.exe: run gvfs unmount for each enlistment).

  5. 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.

  6. 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.

  1. 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.

  2. Build it with scripts\Build.bat (Debug, x64), as Readme.md says.

  3. 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
  4. 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

  1. Install the Git for Windows SDK (git-sdk-64).
  2. In the SDK's bash, clone https://github.com/tyrielv/microsoft-git, and check out sparse-index/preview.
  3. Run make -j$(nproc) DEVELOPER=1. Then run make test T="t1093-*.sh t1094-*.sh t1095-*.sh t1096-*.sh t1097-*.sh t1098-*.sh" for the tests of these PRs.
  4. To make an overlay like the zip, follow the "Build Git" job in .github/workflows/vfs-functional-tests.yml on the same branch. It installs to a payload folder 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.