Repository navigation
revert change to ignore_skip_worktree in git checkout and git restore - #674
Merged
Johannes Schindelin (dscho) merged 1 commit intoJul 12, 2024
Conversation
Derrick Stolee (derrickstolee)
requested a review
from Johannes Schindelin (dscho)
July 12, 2024 19:05
Johannes Schindelin (dscho)
approved these changes
Jul 12, 2024
Johannes Schindelin (dscho)
left a comment
Member
There was a problem hiding this comment.
Makes sense. It's sad that we cannot keep the VFS for Git bug fix, but the regression is too bad not to revert. Thank you for diagnosing this so thoroughly and fixing it!
Johannes Schindelin (dscho)
enabled auto-merge
July 12, 2024 19:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts #658 and essentially reopens microsoft/VFSForGit#1812. Resolves #673.
The issue is that by overriding the
ignore_skip_wortreevalue (normally set by--ignore-skip-worktree) we then force Git to hydrate the entire working directory in agit restore .. This leads to some interesting trade-offs:git restore .overhydrates), they can usegit reset --hardas a better representation of this behavior.git restore --ignore-skip-worktree -- <pathspec>when using a smaller-scale pathspec that corresponds to files they care about and probably have hydrated.I will include these workarounds in the VFS for Git issue.
To get to a real solution here, we would somehow need to turn the
ignore_skip_worktreebit into two bits:a. A bit to say "update index entries that have
SKIP_WORKTREEset".b. A bit to say "update the working directory even if
SKIP_WORKTREEis set".And perhaps this "working directory" version is what was intended when adding the
--ignore-skip-worktreeoption, but it's more involved and has upstream implications to make changes here.