diff --git a/LibGit2Sharp.Tests/RepositoryFixture.cs b/LibGit2Sharp.Tests/RepositoryFixture.cs index 5c551fabd..b0b9caa1d 100644 --- a/LibGit2Sharp.Tests/RepositoryFixture.cs +++ b/LibGit2Sharp.Tests/RepositoryFixture.cs @@ -78,6 +78,15 @@ public void IsValidWithValidPath() Assert.True(Repository.IsValid(repoPath)); } + //[Fact] + //public void IsValidWithInvalidGitConfig() + //{ + // string repoPath = InitNewRepository(); + // File.AppendAllLines(Path.Combine(repoPath, "config"), new[] { @"[diff ""mytool""] command = C:\path\to\mytool\mytool.exe" }); + // var ex = Assert.Throws(() => Repository.IsValid(repoPath)); + // Assert.Equal(@"invalid escape at path\to\mytool\mytool.exe", ex.Message); + //} + [Fact] public void CanCreateStandardRepo() { diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs index c3a53b95e..1ec6dbe13 100644 --- a/LibGit2Sharp/Core/Proxy.cs +++ b/LibGit2Sharp/Core/Proxy.cs @@ -2575,6 +2575,11 @@ public static unsafe void git_repository_open_ext(string path, RepositoryOpenFla res = NativeMethods.git_repository_open_ext(out repo, path, flags, ceilingDirs); NativeMethods.git_repository_free(repo); + //if (res == (int)GitErrorCode.Ok) + //{ + // NativeMethods.git_repository_free(repo); + //} + if (res == (int)GitErrorCode.NotFound) { throw new RepositoryNotFoundException("Path '{0}' doesn't point at a valid Git repository or workdir.", pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy