Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions LibGit2Sharp/Core/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,9 +1026,6 @@ internal static extern int git_remote_delete(
RepositorySafeHandle repo,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string name);

[DllImport(libgit2)]
internal static extern void git_remote_disconnect(RemoteSafeHandle remote);

[DllImport(libgit2)]
internal static extern int git_remote_fetch(
RemoteSafeHandle remote,
Expand Down
8 changes: 0 additions & 8 deletions LibGit2Sharp/Core/Proxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2032,14 +2032,6 @@ public static void git_remote_delete(RepositorySafeHandle repo, string name)
}
}

public static void git_remote_disconnect(RemoteSafeHandle remote)
{
using (ThreadAffinity())
{
NativeMethods.git_remote_disconnect(remote);
}
}

public static GitRefSpecHandle git_remote_get_refspec(RemoteSafeHandle remote, int n)
{
return NativeMethods.git_remote_get_refspec(remote, (UIntPtr)n);
Expand Down
18 changes: 5 additions & 13 deletions LibGit2Sharp/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,19 +248,11 @@ public virtual void Push(
GitRemoteCallbacks gitCallbacks = callbacks.GenerateCallbacks();
Proxy.git_remote_set_callbacks(remoteHandle, ref gitCallbacks);

try
{
Proxy.git_remote_connect(remoteHandle, GitDirection.Push);
Proxy.git_remote_push(remoteHandle, pushRefSpecs,
new GitPushOptions()
{
PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism
});
}
finally
{
Proxy.git_remote_disconnect(remoteHandle);
}
Proxy.git_remote_push(remoteHandle, pushRefSpecs,
new GitPushOptions()
{
PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism
});
}
}

Expand Down