diff options
author | nulltoken <emeric.fermas@gmail.com> | 2015-05-24 19:41:50 +0300 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2015-05-24 19:41:50 +0300 |
commit | 659be882b2445a6273d0cde9781f9a1b42c52648 (patch) | |
tree | fd35cfd089f7d7bfcb209e96a76ef038eaa5cf40 | |
parent | 645d89e7f92b2d4a2cc7c38aa6ba895b80757800 (diff) | |
parent | 9ddca3184dd9d45864d19448b829bb055d98ec09 (diff) |
Merge pull request #1038 from libgit2/Therzok-remove-forced-connection
Remove manual connection to remote
-rw-r--r-- | LibGit2Sharp/Core/NativeMethods.cs | 3 | ||||
-rw-r--r-- | LibGit2Sharp/Core/Proxy.cs | 8 | ||||
-rw-r--r-- | LibGit2Sharp/Network.cs | 18 |
3 files changed, 5 insertions, 24 deletions
diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index b71d4708..a9453529 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -1027,9 +1027,6 @@ namespace LibGit2Sharp.Core [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, ref GitStrArray refspecs, diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs index a7b4d6ef..68888cae 100644 --- a/LibGit2Sharp/Core/Proxy.cs +++ b/LibGit2Sharp/Core/Proxy.cs @@ -2032,14 +2032,6 @@ namespace LibGit2Sharp.Core } } - 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 a0216f9b..5eb1720c 100644 --- a/LibGit2Sharp/Network.cs +++ b/LibGit2Sharp/Network.cs @@ -404,19 +404,11 @@ namespace LibGit2Sharp 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 + }); } } |