microsoft / microsoft/VFSForGit

Problem unlinking when checking out individual files

Open
#1,523 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects: polish domain: user-mode type: bug
Dominant language
C#
Stars
6.1k
Forks
474
Avg merge
2d 4h
Merged PRs (30d)
8

Description

Local Repro

C:\gvfs_repos>gvfs clone https://gvfs.visualstudio.com/ci/_git/ForTests ft
Clone parameters:
Repo URL: https://gvfs.visualstudio.com/ci/_git/ForTests
Branch: Default
Cache Server: Default
Local Cache: C:.gvfsCache
Destination: C:\gvfs_repos\ft
Authenticating...Succeeded
Querying remote for config...Succeeded
Using cache server: None (https://gvfs.visualstudio.com/ci/_git/ForTests)
Cloning...Succeeded
Fetching commits and trees from origin (no cache server)...Succeeded
Validating repo...Succeeded
Mounting...Succeeded
Registering for automount...Succeeded

C:\gvfs_repos>cd ft\src

C:\gvfs_repos\ft\src>git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

C:\gvfs_repos\ft\src>git checkout origin/FunctionalTests/20180214 -- Readme.md
error: unable to unlink old 'Readme.md': No such file or directory

C:\gvfs_repos\ft\src>type Readme.md >..\test.txt

C:\gvfs_repos\ft\src>git checkout origin/FunctionalTests/20180214 -- Readme.md
error: pathspec 'Readme.md' did not match any file(s) known to git

C:\gvfs_repos\ft\src>git checkout --ignore-skip-worktree-bits origin/FunctionalTests/20180214 -- Readme.md

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Windows checkout sequence in the VFSForGit repository: clone ForTests, enter src, and run git checkout origin/FunctionalTests/20180214 -- Readme.md. Compare the initial checkout failure and the later pathspec error, then trace the individual-file checkout and unlink handling. Done means checking out Readme.md succeeds without the unlink error and leaves the expected file content.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.