FetchOptions: add ability to specify ProxyOptions #623

Merged
lollipopman merged 3 commits from clone-proxy-opts into master 2020-07-10 15:00:53 -05:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit db78e55d45 - Show all commits

View File

@ -119,7 +119,7 @@ type FetchOptions struct {
Headers []string Headers []string
// Proxy options to use for this fetch operation // Proxy options to use for this fetch operation
*ProxyOptions ProxyOptions ProxyOptions
} }
type ProxyType uint type ProxyType uint
@ -698,7 +698,7 @@ func populateFetchOptions(options *C.git_fetch_options, opts *FetchOptions) {
options.custom_headers.count = C.size_t(len(opts.Headers)) options.custom_headers.count = C.size_t(len(opts.Headers))
options.custom_headers.strings = makeCStringsFromStrings(opts.Headers) options.custom_headers.strings = makeCStringsFromStrings(opts.Headers)
options.proxy_opts = C.git_proxy_options{} options.proxy_opts = C.git_proxy_options{}
populateProxyOptions(&options.proxy_opts, opts.ProxyOptions) populateProxyOptions(&options.proxy_opts, &opts.ProxyOptions)
} }
func populatePushOptions(options *C.git_push_options, opts *PushOptions) { func populatePushOptions(options *C.git_push_options, opts *PushOptions) {