microsoft / microsoft/VFSForGit
Git Restore Fails with "did not match any file(s) known to git"
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
Running git restore for a particular file appears to be not be compatible with GVFS. Repro below:
$commit = git log -1 --pretty=%H
git ls-tree -r --name-only $commit some/file.cpp
some/file.cpp
git restore --source=$commit some/file.cpp
error: pathspec some/file.cpp' did not match any file(s) known to git
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
Start by reproducing the reported sequence with git log, git ls-tree, and git restore for the same commit and path. Investigate the GVFS handling of git restore when the path is present in the commit tree. Done means restoring some/file.cpp from the specified commit succeeds without the pathspec error, with the reproduction verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100