From c1ec21d89caa0cdb0aefd6f6b8f95648418a3543 Mon Sep 17 00:00:00 2001 From: Sanskar Jaiswal Date: Tue, 4 Oct 2022 20:20:57 +0530 Subject: libgit2 v1.5.0 #major (#929) Update libgit2 to v1.5.0. Replace `SmartProxyOptions()` with `SmartRemoteConnectOptions()`. Fixes: https://github.com/libgit2/git2go/issues/899 Signed-off-by: Sanskar Jaiswal Co-authored-by: lhchavez --- remote.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'remote.go') diff --git a/remote.go b/remote.go index cde92b9..a294ca2 100644 --- a/remote.go +++ b/remote.go @@ -146,6 +146,17 @@ type FetchOptions struct { ProxyOptions ProxyOptions } +type RemoteConnectOptions struct { + // Proxy options to use for this fetch operation + ProxyOptions ProxyOptions +} + +func remoteConnectOptionsFromC(copts *C.git_remote_connect_options) *RemoteConnectOptions { + return &RemoteConnectOptions{ + ProxyOptions: proxyOptionsFromC(&copts.proxy_opts), + } +} + type ProxyType uint const ( @@ -170,8 +181,8 @@ type ProxyOptions struct { Url string } -func proxyOptionsFromC(copts *C.git_proxy_options) *ProxyOptions { - return &ProxyOptions{ +func proxyOptionsFromC(copts *C.git_proxy_options) ProxyOptions { + return ProxyOptions{ Type: ProxyType(copts._type), Url: C.GoString(copts.url), } -- cgit v1.2.3