Skip to content

Commit 5eca48c

Browse files
authored
Add ProxyOptions for push operations (#872)
Analog to #623 but for push operations rather than fetch.
1 parent 1fcc9d8 commit 5eca48c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: remote.go

+5
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)