From db78e55d4586fabf349f8acfe7a31e01e6abfb9a Mon Sep 17 00:00:00 2001 From: Jesse Hathaway Date: Fri, 10 Jul 2020 19:33:52 +0000 Subject: [PATCH] FetchOptions: don't embed the ProxyOptions Rather than embeding the ProxyOptions struct add a member to the struct. Also use a value rather than a pointer, so that the zero value of FetchOptions is well defined. --- remote.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remote.go b/remote.go index 74aebe4..9cfe121 100644 --- a/remote.go +++ b/remote.go @@ -119,7 +119,7 @@ type FetchOptions struct { Headers []string // Proxy options to use for this fetch operation - *ProxyOptions + ProxyOptions ProxyOptions } 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.strings = makeCStringsFromStrings(opts.Headers) 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) {