Skip to content

Commit a800947

Browse files
Add ProxyOptions for push operations (#872) (#884)
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 b1120d3 commit a800947

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
@@ -291,6 +291,9 @@ type PushOptions struct {
291291

292292
// Headers are extra headers for the push operation.
293293
Headers []string
294+
295+
// Proxy options to use for this push operation
296+
ProxyOptions ProxyOptions
294297
}
295298

296299
type RemoteHead struct {
@@ -991,6 +994,7 @@ func populatePushOptions(copts *C.git_push_options, opts *PushOptions, errorTarg
991994
strings: makeCStringsFromStrings(opts.Headers),
992995
}
993996
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
997+
populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions)
994998
return copts
995999
}
9961000

@@ -1000,6 +1004,7 @@ func freePushOptions(copts *C.git_push_options) {
10001004
}
10011005
untrackCallbacksPayload(&copts.callbacks)
10021006
freeStrarray(&copts.custom_headers)
1007+
freeProxyOptions(&copts.proxy_opts)
10031008
}
10041009

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

0 commit comments

Comments
 (0)