microsoft / microsoft/VFSForGit

Cannot read virtual files while 'git mergetool` is running

Open
#1,139 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

platform: windows type: bug
Dominant language
C#
Stars
6.1k
Forks
474
Avg merge
2d 4h
Merged PRs (30d)
8

Description

The CanCreatePlaceholder check:

https://github.com/microsoft/VFSForGit/blob/22582651bfd96c936ef609ec2fa76c4f75ddb66d/GVFS/GVFS.Platform.Windows/WindowsFileSystemVirtualizer.cs#L385

In GetPlaceholderInfoCallback is preventing users from being able to read virtual files while git mergetool is running.

To reproduce issue:

  1. Push two branches that will have a merge conflict. One of the two branches should contain source files not present in the other.
  2. Create a new clone of the repo
  3. Checkout the first branch (that does not have the new files)
  4. Merge in the second branch
  5. After the merge conflict occurs, run git mergetool
  6. While the merge tool is running, attempt to read one of the new files (or any file that does not currently have a placeholder on disk). The read will fail.

Example verbose logging during step 6:

[2019-05-09 15:16:25 -07:00] GetPlaceholderInfoCallback {"Area":"WindowsFileSystemVirtualizer","relativePath":"1.txt","commandId":364,"triggeringProcessId":24464,"triggeringProcessImageFileName":"\Device\HarddiskVolume9\Windows\System32\notepad.exe","Message":"GetPlaceholderInfoCallback: Not allowed to create placeholder"}

See also related issues #1040, #1096

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 at GVFS/GVFS.Platform.Windows/WindowsFileSystemVirtualizer.cs near the linked CanCreatePlaceholder check and trace how GetPlaceholderInfoCallback handles reads during git mergetool. Reproduce the documented conflicting-branch sequence, then verify that a file without an on-disk placeholder can be read while the merge tool is running.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.