Skip to content

Conversation

tyrielv
Copy link

@tyrielv tyrielv commented Sep 3, 2025

This is a fix for microsoft/VFSForGit#1855

When git restore --staged is run in certain situations, such as after git cherry-pick -n or git reset --soft, git may change the SKIP_WORKTREE bits for some entries from TRUE to FALSE. index->updated_skipworktree needs to be set in this scenario so that when VFSForGit is notified about the index update it can invalidate its cache.

@tyrielv tyrielv marked this pull request as draft September 3, 2025 22:23
@tyrielv
Copy link
Author

tyrielv commented Sep 3, 2025

Moving back to draft.

This fixes the "disappearing" files from git status, but there's still a difference between git-with-VFS and regular git when running restore --staged .

regular git unstages the added files too, so git status will show them as untracked, but even with this change git restore --staged . will leave added files as staged.
This part I think is due to the skip_worktree bit being set already on those files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant