Skip to content

Commit d80ecf1

Browse files
committed
Tidy
1 parent 9bce3ac commit d80ecf1

File tree

7 files changed

+7
-23
lines changed

7 files changed

+7
-23
lines changed

LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
<ItemGroup>
88
<ProjectReference Include="..\LibGit2Sharp\LibGit2Sharp.csproj" />
9-
<!--<ProjectReference Include="..\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj" Condition="'$(TargetFramework)' == 'net472'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
10-
<ProjectReference Include="..\NativeLibraryLoadTestApp\x64\NativeLibraryLoadTestApp.x64.csproj" Condition="'$(TargetFramework)' == 'net472'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />-->
9+
<ProjectReference Include="..\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj" Condition="'$(TargetFramework)' == 'net472'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
10+
<ProjectReference Include="..\NativeLibraryLoadTestApp\x64\NativeLibraryLoadTestApp.x64.csproj" Condition="'$(TargetFramework)' == 'net472'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

LibGit2Sharp.Tests/NetworkFixture.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ namespace LibGit2Sharp.Tests
99
public class NetworkFixture : BaseFixture
1010
{
1111
[Theory]
12-
//[InlineData("http://github.com/libgit2/TestGitRepository")]
12+
[InlineData("http://github.com/libgit2/TestGitRepository")]
13+
[InlineData("https://github.com/libgit2/TestGitRepository")]
1314
[InlineData("git@github.com:libgit2/TestGitRepository.git")]
1415
public void CanListRemoteReferences(string url)
1516
{
@@ -20,12 +21,7 @@ public void CanListRemoteReferences(string url)
2021
using (var repo = new Repository(repoPath))
2122
{
2223
Remote remote = repo.Network.Remotes.Add(remoteName, url);
23-
IList<Reference> references = repo.Network.ListReferences(remote, (s, fromUrl, types) =>
24-
{
25-
26-
return null;
27-
}).ToList();
28-
24+
IList<Reference> references = repo.Network.ListReferences(remote).ToList();
2925

3026
foreach (var reference in references)
3127
{

LibGit2Sharp/Core/GitRemoteCallbacks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ internal struct GitRemoteCallbacks
3939

4040
internal NativeMethods.url_resolve_callback resolve_url;
4141

42-
internal IntPtr update_refs; // git_remote_update_ref_cb added in libgit2 v1.9
42+
internal IntPtr update_refs;
4343
}
4444
}

LibGit2Sharp/GlobalSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static class GlobalSettings
2020

2121
private static string nativeLibraryPath;
2222
private static bool nativeLibraryPathLocked;
23-
private static readonly string nativeLibraryDefaultPath = "/Users/robert/Development/Sandbox/libgit2/build";
23+
private static readonly string nativeLibraryDefaultPath = null;
2424

2525
static GlobalSettings()
2626
{

LibGit2Sharp/RemoteCallbacks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ private int GitCredentialHandler(
307307
types |= SupportedCredentialTypes.SSMemory;
308308
}
309309

310-
311310
ptr = IntPtr.Zero;
312311
try
313312
{

LibGit2Sharp/SshUserKeyCredentials.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ protected internal override int GitCredentialHandler(out IntPtr cred)
2525
throw new InvalidOperationException("SshUserKeyCredentials contains a null Passphrase.");
2626
}
2727

28-
if (PublicKey == null)
29-
{
30-
// TODO: Can this be null or do we need to derive from the private key?
31-
throw new InvalidOperationException("SshUserKeyCredentials contains a null PublicKey.");
32-
}
33-
3428
if (PrivateKey == null)
3529
{
3630
throw new InvalidOperationException("SshUserKeyCredentials contains a null PrivateKey.");

LibGit2Sharp/SshUserKeyMemoryCredentials.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ protected internal override int GitCredentialHandler(out IntPtr cred)
2525
throw new InvalidOperationException("SshUserKeyMemoryCredentials contains a null Passphrase.");
2626
}
2727

28-
if (PublicKey == null)
29-
{
30-
// TODO: Can this be null or do we need to derive from the private key?
31-
}
32-
3328
if (PrivateKey == null)
3429
{
3530
throw new InvalidOperationException("SshUserKeyMemoryCredentials contains a null PrivateKey.");

0 commit comments

Comments
 (0)