(copts *C.git_push_options, opts *PushOptions, errorTarget *error)
| 1004 | } |
| 1005 | |
| 1006 | func populatePushOptions(copts *C.git_push_options, opts *PushOptions, errorTarget *error) *C.git_push_options { |
| 1007 | C.git_push_options_init(copts, C.GIT_PUSH_OPTIONS_VERSION) |
| 1008 | if opts == nil { |
| 1009 | return nil |
| 1010 | } |
| 1011 | |
| 1012 | copts.pb_parallelism = C.uint(opts.PbParallelism) |
| 1013 | copts.custom_headers = C.git_strarray{ |
| 1014 | count: C.size_t(len(opts.Headers)), |
| 1015 | strings: makeCStringsFromStrings(opts.Headers), |
| 1016 | } |
| 1017 | populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget) |
| 1018 | populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions) |
| 1019 | return copts |
| 1020 | } |
| 1021 | |
| 1022 | func freePushOptions(copts *C.git_push_options) { |
| 1023 | if copts == nil { |
no test coverage detected
searching dependent graphs…