github microsoft/git v2.32.0.vfs.0.101.exp
v2.32.0.vfs.0.101.exp (Sparse Index Experimental Release)

latest releases: v2.45.0.vfs.0.1.rc0, v2.45.0.vfs.0.0, v2.44.0.vfs.0.2...
pre-release2 years ago

This release includes an early version of the sparse index feature. This feature significantly reduces the size of the .git/index file when using cone-mode sparse-checkout patterns, making integrated Git commands much faster. These commands have been integrated with the sparse index in this version:

  • git status
  • git commit
  • git checkout
  • git add

These integrations are considered safe to use in production use. The reason this release is experimental is because the sparse index adds some overhead to commands that have not been integrated with the feature. Thus, commands such as git diff, git merge, and git rebase have additional cost to translate from the sparse index into a full one before performing operations on the index. We plan to integrate these commands (among others) in a future release.

This release enables the sparse index by default. New clones will automatically start with a sparse index.

To update an existing clone to have a sparse index, run git sparse-checkout reapply.

If you previously disabled the sparse index, run git sparse-checkout init --cone --sparse-index to reenable it.

Update to Experimental Release

Our first experimental release of the sparse index feature (v2.32.0.vfs.0.99.exp) had two bugs that have since been resolved. These were due to gaps in our test suites that have been resolved. Here are the important points of how these bugs have been resolved:

  • There was a bug when expanding a sparse index to a full one in a way that affected the untracked cache. This was causing a crash in git status. While we fixed the bug (see #395) we also identified why the users were hit this code path at all during git status. When changing a sparse-checkout definition to remove a directory that was previously in the cone, Git only removed the tracked files in that directory, not the ignored ones. This means that users who had build artifacts in those directories would now see them as ignored, untracked files. To discover this was the case, git status would expand the sparse index to discover that they were indeed untracked. These build artifacts did not exist in our testing. We modified git sparse-checkout set to remove directories that go out of scope, including all contained ignored files. See #396, where a call to git clean -dfx -- <dir1> <dir2> ... performs this deletion.

  • There was an unrelated error during git checkout that occurred rarely, but only when the sparse-checkout cone contained paths multiple levels deep and certain files changed triggering a code path that had a bug. This is resolved as part of #396 (see 2d3b5b4 for this specific fix).

Troubleshooting

If you see a problem with this feature, then please use these steps:

  1. Run scalar diagnose.
  2. Attach the resulting .zip file in an email to git-client@github.com.
  3. Disable the sparse index with git sparse-checkout init --cone --no-sparse-index.

If you send such a report to us, then we will examine it with high priority to ensure you are unblocked.

Pull Requests since v2.32.0.vfs.0.3

  • #374: [Sparse Index] Integrate with git status
  • #361: [Sparse Index] Integrate with git commit and git checkout
  • #364: [Sparse Index] Integrate git add with sparse-index
  • #388: [Sparse Index] enable index.sparse by default
  • #386: Add release-apt-get workflow
  • #392: add: allow adding sparse entries when virtual
  • #393: Add instructions for apt-get install to README
  • #394: scalar clone: show cache server url
  • #395: [Sparse Index] Fix crash in status
  • #396: [Sparse Index] Delete ignored files outside of cone

Don't miss a new git release

NewReleases is sending notifications on new releases.