Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <teromario@yahoo.com>2015-05-04 17:00:09 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2015-05-24 17:01:15 +0300
commit9ddca3184dd9d45864d19448b829bb055d98ec09 (patch)
tree439552d007addb8bea6292eefda3647ebc674520
parent0b3109048f0ec3ac8fd991370c40aba69526f742 (diff)
Remove manual connection to remote
As seen in https://github.com/libgit2/libgit2/blob/master/src/remote.c#L2381-L2397
-rw-r--r--LibGit2Sharp/Core/NativeMethods.cs3
-rw-r--r--LibGit2Sharp/Core/Proxy.cs8
-rw-r--r--LibGit2Sharp/Network.cs18
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 49d80d3d..38e174aa 100644
--- a/LibGit2Sharp/Network.cs
+++ b/LibGit2Sharp/Network.cs
@@ -248,19 +248,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
+ });
}
}