(copts *C.git_fetch_options, opts *FetchOptions, errorTarget *error)
| 977 | } |
| 978 | |
| 979 | func populateFetchOptions(copts *C.git_fetch_options, opts *FetchOptions, errorTarget *error) *C.git_fetch_options { |
| 980 | C.git_fetch_options_init(copts, C.GIT_FETCH_OPTIONS_VERSION) |
| 981 | if opts == nil { |
| 982 | return nil |
| 983 | } |
| 984 | populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget) |
| 985 | copts.prune = C.git_fetch_prune_t(opts.Prune) |
| 986 | copts.update_fetchhead = cbool(opts.UpdateFetchhead) |
| 987 | copts.download_tags = C.git_remote_autotag_option_t(opts.DownloadTags) |
| 988 | |
| 989 | copts.custom_headers = C.git_strarray{ |
| 990 | count: C.size_t(len(opts.Headers)), |
| 991 | strings: makeCStringsFromStrings(opts.Headers), |
| 992 | } |
| 993 | populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions) |
| 994 | return copts |
| 995 | } |
| 996 | |
| 997 | func freeFetchOptions(copts *C.git_fetch_options) { |
| 998 | if copts == nil { |
no test coverage detected
searching dependent graphs…