Skip to content

Commit bfd5153

Browse files
au2001lhchavez
authored andcommitted
Add ProxyOptions for push operations (#872)
Analog to #623 but for push operations rather than fetch. (cherry picked from commit 5eca48c)
1 parent a3f32b9 commit bfd5153

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 {
@@ -1001,6 +1004,7 @@ func populatePushOptions(copts *C.git_push_options, opts *PushOptions, errorTarg
10011004
strings: makeCStringsFromStrings(opts.Headers),
10021005
}
10031006
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
1007+
populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions)
10041008
return copts
10051009
}
10061010

@@ -1010,6 +1014,7 @@ func freePushOptions(copts *C.git_push_options) {
10101014
}
10111015
untrackCallbacksPayload(&copts.callbacks)
10121016
freeStrarray(&copts.custom_headers)
1017+
freeProxyOptions(&copts.proxy_opts)
10131018
}
10141019

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

0 commit comments

Comments
 (0)