microsoft / microsoft/VFSForGit
Error when cloning an empty repo
Open
Nobody has claimed this yet.
type: bug
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
Calling $ gvfs clone https://<user>.visualstudio.com/_git/<proj> on an empty repo gives the following error:
Clone parameters:
Repo URL: https://<user>.visualstudio.com/_git/<proj>
Cache Server: Default
Destination: <path>
Authenticating...Succeeded
Querying remote for config...Succeeded
Using cache server: None (https://<user>.visualstudio.com/_git/<proj>)
Cloning...Failed. Run 'gvfs log <path>' for more info.
Cannot clone @ <path>: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at GVFS.CommandLine.CloneVerb.CreateClone(ITracer tracer, GVFSEnlistment enlistment, GitObjectsHttpRequestor objectRequestor, GitRefs refs, String branch) in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS\CommandLine\CloneVerb.cs:line 368
at GVFS.CommandLine.CloneVerb.TryClone(JsonEtwTracer tracer, GVFSEnlistment enlistment, CacheServerInfo cacheServer, RetryConfig retryConfig) in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS\CommandLine\CloneVerb.cs:line 297
at GVFS.CommandLine.CloneVerb.<>c__DisplayClass31_2.<Execute>b__1() in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS\CommandLine\CloneVerb.cs:line 143
at GVFS.Common.ConsoleHelper.<>c__DisplayClass3_0.<ShowStatusWhileRunning>b__0() in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS.Common\ConsoleHelper.cs:line 44
at GVFS.Common.ConsoleHelper.ShowStatusWhileRunning(Func`1 action, String message, TextWriter output, Boolean showSpinner, String gvfsLogEnlistmentRoot, Int32 initialDelayMs) in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS.Common\ConsoleHelper.cs:line 113
at GVFS.CommandLine.GVFSVerb.ShowStatusWhileRunning(Func`1 action, String message, Boolean suppressGvfsLogMessage) in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS\CommandLine\GVFSVerb.cs:line 148
at GVFS.CommandLine.CloneVerb.Execute() in C:\Repos\GitHubUpdate\Internal\GVFS\GVFS\CommandLine\CloneVerb.cs:line 140
GVFS version: 1.0.17318.1
Git version: 2.15.1.gvfs.2.preview.3
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 at GVFS/CommandLine/CloneVerb.cs line 368 and reproduce the reported gvfs clone command against an empty repository. Inspect the dictionary access reached during clone, then verify the behavior with an empty repository; done means cloning no longer fails with KeyNotFoundException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100