title: Does LibGit2Sharp support cloning a repository from the local file system?
body: <p>I am trying to clone a git repository from the local file system:</p>
  
  <pre><code>using System;
  using LibGit2Sharp;
  
  class Program
  {
      static void Main()
      {
          var sourceUrl = @"file:///c:/work/libgit2sharp";
          using (Repository.Clone(sourceUrl, "targetDir", bare: true))
          {
              Console.WriteLine("repository successfully cloned");
          }
      }
  }
  </code></pre>
  
  <p>and I get an exception:</p>
  
  <pre><code>Unhandled Exception: LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = Odb (Error).
  Failed to find the memory window file to deregister
     at LibGit2Sharp.Core.Ensure.Success(Int32 result, Boolean allowPositiveResult) in c:\work\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 85
     at LibGit2Sharp.Core.Proxy.git_clone_bare(String url, String workdir, git_transfer_progress_callback transfer_cb) in c:\work\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 219
     at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, Boolean bare, Boolean checkout, TransferProgressHandler onTransferProgress, CheckoutProgressHandler onCheckoutProgress) in c:\work\libgit2sharp\LibGit2Sharp\Repository.cs:line 431
     at Program.Main() in c:\work\ConsoleApplication1\Program.cs:line 10
  </code></pre>
  
  <p>I've also tried the following source url:</p>
  
  <pre><code>var sourceUrl = @"c:\work\libgit2sharp\.git\";
  </code></pre>
  
  <p>and got another exception:</p>
  
  <pre><code>Unhandled Exception: LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = Config (Error).
  Failed to parse config file: Unexpected end of file while parsing multine var (in c:/work/ConsoleApplication1/bin/Debug/targetDir/config:23, column 0)
     at LibGit2Sharp.Core.Ensure.Success(Int32 result, Boolean allowPositiveResult) in c:\work\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 85
     at LibGit2Sharp.Core.Proxy.git_clone_bare(String url, String workdir, git_transfer_progress_callback transfer_cb) in c:\work\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 219
     at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, Boolean bare, Boolean checkout, TransferProgressHandler onTransferProgress, CheckoutProgressHandler onCheckoutProgress) in c:\work\libgit2sharp\LibGit2Sharp\Repository.cs:line 431
     at Program.Main() in c:\work\ConsoleApplication1\Program.cs:line 12
  </code></pre>
  
  <p><code>targetDir</code> is never created.</p>
  
  <p>If on the other hand I use HTTP transport, the <code>Repository.Clone</code> method works fine:</p>
  
  <pre><code>var sourceUrl = "https://github.com/libgit2/libgit2sharp";
  </code></pre>
  
  <p>So my question is if I am doing something wrong or if this is unsupported feature or a bug in the native <code>git2.dll</code>?</p>