diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index b71d47081..a94535299 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -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, diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs index a7b4d6ef9..68888cae2 100644 --- a/LibGit2Sharp/Core/Proxy.cs +++ b/LibGit2Sharp/Core/Proxy.cs @@ -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); diff --git a/LibGit2Sharp/Network.cs b/LibGit2Sharp/Network.cs index 49d80d3d4..38e174aac 100644 --- a/LibGit2Sharp/Network.cs +++ b/LibGit2Sharp/Network.cs @@ -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 + }); } }