Analog to #623 but for push operations rather than fetch.
(cherry picked from commit 5eca48cda9
)
Co-authored-by: Aurélien <6292584+au2001@users.noreply.github.com>
This commit is contained in:
parent
04b9efcea2
commit
d0ff27733f
|
@ -270,6 +270,9 @@ type PushOptions struct {
|
||||||
|
|
||||||
// Headers are extra headers for the push operation.
|
// Headers are extra headers for the push operation.
|
||||||
Headers []string
|
Headers []string
|
||||||
|
|
||||||
|
// Proxy options to use for this push operation
|
||||||
|
ProxyOptions ProxyOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
type RemoteHead struct {
|
type RemoteHead struct {
|
||||||
|
@ -945,6 +948,7 @@ func populatePushOptions(copts *C.git_push_options, opts *PushOptions, errorTarg
|
||||||
strings: makeCStringsFromStrings(opts.Headers),
|
strings: makeCStringsFromStrings(opts.Headers),
|
||||||
}
|
}
|
||||||
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
|
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
|
||||||
|
populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions)
|
||||||
return copts
|
return copts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -954,6 +958,7 @@ func freePushOptions(copts *C.git_push_options) {
|
||||||
}
|
}
|
||||||
untrackCallbacksPayload(&copts.callbacks)
|
untrackCallbacksPayload(&copts.callbacks)
|
||||||
freeStrarray(&copts.custom_headers)
|
freeStrarray(&copts.custom_headers)
|
||||||
|
freeProxyOptions(&copts.proxy_opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch performs a fetch operation. refspecs specifies which refspecs
|
// Fetch performs a fetch operation. refspecs specifies which refspecs
|
||||||
|
|
Loading…
Reference in New Issue