summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
authorSanskar Jaiswal <[email protected]>2022-10-04 20:20:57 +0530
committerGitHub <[email protected]>2022-10-04 07:50:57 -0700
commitc1ec21d89caa0cdb0aefd6f6b8f95648418a3543 (patch)
tree33d4bb4b521a5c5f4502d92db478b0786953363b /remote.go
parent9db5de109c166aa802b85cfae2dced3c4728a00d (diff)
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 <[email protected]> Co-authored-by: lhchavez <[email protected]>
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go15
1 files changed, 13 insertions, 2 deletions
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),
}