diff options
| author | Jesse Hathaway <[email protected]> | 2020-07-10 15:00:52 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-10 13:00:52 -0700 |
| commit | b1cad11555ac966c1575375eb69ebb6c6463b27f (patch) | |
| tree | 136e89cb21fc4fb068ae1299201f7d36e26b8434 /remote.go | |
| parent | 20a55cdf92f4ad6af4110861811a7076056cdf36 (diff) | |
FetchOptions: add ability to specify ProxyOptions (#623)
Prior to this change you could not specifiy proxy options on the
FetchOptions struct, which made it impossible to specify a proxy for an
initial clone. This change adds the ProxyOptions to the FetchOptions
struct so you can go through a proxy when cloning.
Diffstat (limited to 'remote.go')
| -rw-r--r-- | remote.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -117,6 +117,9 @@ type FetchOptions struct { // Headers are extra headers for the fetch operation. Headers []string + + // Proxy options to use for this fetch operation + ProxyOptions ProxyOptions } type ProxyType uint @@ -694,6 +697,7 @@ func populateFetchOptions(options *C.git_fetch_options, opts *FetchOptions) { options.custom_headers = C.git_strarray{} options.custom_headers.count = C.size_t(len(opts.Headers)) options.custom_headers.strings = makeCStringsFromStrings(opts.Headers) + populateProxyOptions(&options.proxy_opts, &opts.ProxyOptions) } func populatePushOptions(options *C.git_push_options, opts *PushOptions) { |
