Skip to content

Commit d8ab449

Browse files
committed
Exception is thrown if file path is passed as remote to Commands.Fetch
1 parent d3893f0 commit d8ab449

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: LibGit2Sharp/Core/Proxy.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2373,8 +2373,9 @@ public static unsafe RemoteHandle git_remote_lookup(RepositoryHandle repo, strin
23732373
git_remote* handle;
23742374
int res = NativeMethods.git_remote_lookup(out handle, repo, name);
23752375

2376-
if (res == (int)GitErrorCode.NotFound && !throwsIfNotFound)
2376+
if (!throwsIfNotFound)
23772377
{
2378+
if (res == (int)GitErrorCode.NotFound || res == (int)GitErrorCode.InvalidSpecification)
23782379
return null;
23792380
}
23802381

0 commit comments

Comments
 (0)