summaryrefslogtreecommitdiff
path: root/remote.go
diff options
context:
space:
mode:
authorAurĂ©lien <[email protected]>2022-01-18 04:02:14 +0100
committerGitHub <[email protected]>2022-01-17 19:02:14 -0800
commit5eca48cda937e67c1f8d68a55c2db22a79d83d0c (patch)
treef17ce1018c70848e1f6513cbd8f8a3038e74a734 /remote.go
parent1fcc9d87430e41cc333ce5b2431df7058e03bbb7 (diff)
Add ProxyOptions for push operations (#872)
Analog to #623 but for push operations rather than fetch.
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index f4424fc..cde92b9 100644
--- a/remote.go
+++ b/remote.go
@@ -291,6 +291,9 @@ type PushOptions struct {
// Headers are extra headers for the push operation.
Headers []string
+
+ // Proxy options to use for this push operation
+ ProxyOptions ProxyOptions
}
type RemoteHead struct {
@@ -1001,6 +1004,7 @@ func populatePushOptions(copts *C.git_push_options, opts *PushOptions, errorTarg
strings: makeCStringsFromStrings(opts.Headers),
}
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
+ populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions)
return copts
}
@@ -1010,6 +1014,7 @@ func freePushOptions(copts *C.git_push_options) {
}
untrackCallbacksPayload(&copts.callbacks)
freeStrarray(&copts.custom_headers)
+ freeProxyOptions(&copts.proxy_opts)
}
// Fetch performs a fetch operation. refspecs specifies which refspecs