microsoft / microsoft/VFSForGit
`git restore` after `git cherry-pick -n` can leave GVFS in a bad state
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
- Use
git cherry-pick -nto cherry-pick some changes to current branch, leaving them uncommitted - Use
git restore --stagedto unstage the changes
Expected:
All the changes from the cherry-pick move from staged to unstaged in git status.
Actual:
Sometimes some changes disappear from git status.
The files still have the changed contents, but git no longer recognizes the files as being changed.
It's unclear so far whether cherry-pick -n is required or if manual changes with git add will also repro.
git checkout to another branch appears to properly reset the file contents. (I've heard others complain about situations where it did not, though I don't know if they were caused by this and I haven't repro'd that.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported sequence with git cherry-pick -n followed by git restore --staged, then compare git status with the files' actual contents. Investigate the conditions under which changed files disappear from status, including whether manual changes followed by git add reproduce it; done means all changes are consistently reported as unstaged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100