microsoft / git

A fork of Git containing Microsoft-specific patches.
http://git-scm.com/
Other
782 stars 92 forks source link

reset: fix mixed reset when using virtual filesystem (again) #651

Closed derrickstolee closed 4 months ago

derrickstolee commented 5 months ago

This should fix #646, at least in the case that I've been able to verify.

The issue is that reset was setting the skip-worktree bit more frequently than it should have. The previous fix in #494 was focused on the case where a file is added or removed across the diff. However, when the file exists on both sides but still needs to be staged in a mixed reset then we should avoid the skip-worktree bit.


This fork contains changes specific to monorepo scenarios. If you are an external contributor, then please detail your reason for submitting to this fork:

derrickstolee commented 5 months ago

I wanted to validate this change with the VFS for Git functional tests, but I'm not able to run the installer generation build.

rossnichols commented 5 months ago

Thanks for taking a look at this, @derrickstolee! Based on your understanding of the issue, do you know how I can work around it in the meantime? I can't figure out locally what causes some files to work and some to not. I frequently unstage my changes to more easily iterate on them (editing the diff view directly in VSCode), and this bug prevents doing so with confidence.