(copts *C.git_rebase_options, opts *RebaseOptions, repo *Repository, errorTarget *error)
| 234 | } |
| 235 | |
| 236 | func populateRebaseOptions(copts *C.git_rebase_options, opts *RebaseOptions, repo *Repository, errorTarget *error) *C.git_rebase_options { |
| 237 | C.git_rebase_options_init(copts, C.GIT_REBASE_OPTIONS_VERSION) |
| 238 | if opts == nil { |
| 239 | return nil |
| 240 | } |
| 241 | |
| 242 | copts.quiet = C.int(opts.Quiet) |
| 243 | copts.inmemory = C.int(opts.InMemory) |
| 244 | copts.rewrite_notes_ref = mapEmptyStringToNull(opts.RewriteNotesRef) |
| 245 | populateMergeOptions(&copts.merge_options, &opts.MergeOptions) |
| 246 | populateCheckoutOptions(&copts.checkout_options, &opts.CheckoutOptions, errorTarget) |
| 247 | |
| 248 | if opts.CommitCreateCallback != nil || opts.CommitSigningCallback != nil { |
| 249 | data := &rebaseOptionsData{ |
| 250 | options: opts, |
| 251 | repo: repo, |
| 252 | errorTarget: errorTarget, |
| 253 | } |
| 254 | C._go_git_populate_rebase_callbacks(copts) |
| 255 | copts.payload = pointerHandles.Track(data) |
| 256 | } |
| 257 | |
| 258 | return copts |
| 259 | } |
| 260 | |
| 261 | func freeRebaseOptions(copts *C.git_rebase_options) { |
| 262 | if copts == nil { |
no test coverage detected
searching dependent graphs…