Skip to content

Commit 9ddca31

Browse files
committed
1 parent 0b31090 commit 9ddca31

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,6 @@ internal static extern int git_remote_delete(
10261026
RepositorySafeHandle repo,
10271027
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string name);
10281028

1029-
[DllImport(libgit2)]
1030-
internal static extern void git_remote_disconnect(RemoteSafeHandle remote);
1031-
10321029
[DllImport(libgit2)]
10331030
internal static extern int git_remote_fetch(
10341031
RemoteSafeHandle remote,

LibGit2Sharp/Core/Proxy.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,14 +2032,6 @@ public static void git_remote_delete(RepositorySafeHandle repo, string name)
20322032
}
20332033
}
20342034

2035-
public static void git_remote_disconnect(RemoteSafeHandle remote)
2036-
{
2037-
using (ThreadAffinity())
2038-
{
2039-
NativeMethods.git_remote_disconnect(remote);
2040-
}
2041-
}
2042-
20432035
public static GitRefSpecHandle git_remote_get_refspec(RemoteSafeHandle remote, int n)
20442036
{
20452037
return NativeMethods.git_remote_get_refspec(remote, (UIntPtr)n);

LibGit2Sharp/Network.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,19 +248,11 @@ public virtual void Push(
248248
GitRemoteCallbacks gitCallbacks = callbacks.GenerateCallbacks();
249249
Proxy.git_remote_set_callbacks(remoteHandle, ref gitCallbacks);
250250

251-
try
252-
{
253-
Proxy.git_remote_connect(remoteHandle, GitDirection.Push);
254-
Proxy.git_remote_push(remoteHandle, pushRefSpecs,
255-
new GitPushOptions()
256-
{
257-
PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism
258-
});
259-
}
260-
finally
261-
{
262-
Proxy.git_remote_disconnect(remoteHandle);
263-
}
251+
Proxy.git_remote_push(remoteHandle, pushRefSpecs,
252+
new GitPushOptions()
253+
{
254+
PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism
255+
});
264256
}
265257
}
266258

0 commit comments

Comments
 (0)