Skip to content

Commit d0ff277

Browse files
Add ProxyOptions for push operations (#872) (#883)
Analog to #623 but for push operations rather than fetch. (cherry picked from commit 5eca48c) Co-authored-by: Aurélien <6292584+au2001@users.noreply.github.com>
1 parent 04b9efc commit d0ff277

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

remote.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ type PushOptions struct {
270270

271271
// Headers are extra headers for the push operation.
272272
Headers []string
273+
274+
// Proxy options to use for this push operation
275+
ProxyOptions ProxyOptions
273276
}
274277

275278
type RemoteHead struct {
@@ -945,6 +948,7 @@ func populatePushOptions(copts *C.git_push_options, opts *PushOptions, errorTarg
945948
strings: makeCStringsFromStrings(opts.Headers),
946949
}
947950
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
951+
populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions)
948952
return copts
949953
}
950954

@@ -954,6 +958,7 @@ func freePushOptions(copts *C.git_push_options) {
954958
}
955959
untrackCallbacksPayload(&copts.callbacks)
956960
freeStrarray(&copts.custom_headers)
961+
freeProxyOptions(&copts.proxy_opts)
957962
}
958963

959964
// Fetch performs a fetch operation. refspecs specifies which refspecs

0 commit comments

Comments
 (0)