microsoft / microsoft/VFSForGit

Error when cloning an empty repo

Open
#58 6 comments 0 reactions 0 assignees View on GitHub

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

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/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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.