Add functional test for reset --mixed skip-worktree bug (depends on microsoft/git#935)#2018
Draft
tyrielv wants to merge 1 commit into
Draft
Add functional test for reset --mixed skip-worktree bug (depends on microsoft/git#935)#2018tyrielv wants to merge 1 commit into
tyrielv wants to merge 1 commit into
Conversation
Adds ReproResetMixedSkipWorktree to CorruptionReproTests. The test hydrates Readme.md via blame (materializes on disk but not in ModifiedPaths, so skip-worktree stays set), then runs reset HEAD~1. On the FunctionalTests/20201014 branch, Readme.md is the only file that differs between HEAD and HEAD~1. The control repo correctly reports it as modified after the reset; the GVFS repo does not because skip-worktree hides the working-tree vs index mismatch. This test is expected to FAIL until the fix is applied. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
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.
Functional test for reset --mixed skip-worktree bug
Adds
ReproResetMixedSkipWorktreetoCorruptionReproTests. This test validates the fix in microsoft/git#935.Bug
After
git reset --mixed HEAD~N, hydrated files (read viablame/cat-filebut not modified) retainedskip-worktreebecause git'supdate_index_from_diff()only cleared it for files not on disk. Hydrated files were invisible togit statusafter the reset.Test
On the
FunctionalTests/20201014branch,Readme.mdis the only file that differs between HEAD and HEAD~1:blame Readme.md— hydrates the file (ProjFS materializes on disk, not in ModifiedPaths)reset HEAD~1— should reportM Readme.mdin outputWithout the git fix: GVFS repo reports 223 files, control reports 224 (Readme.md missing).
With the git fix: both report 224.
Dependencies
builtin/reset.c)