MCPcopy Create free account
hub / github.com/libgit2/git2go / populateRebaseOptions

Function populateRebaseOptions

rebase.go:236–259  ·  view source on GitHub ↗
(copts *C.git_rebase_options, opts *RebaseOptions, repo *Repository, errorTarget *error)

Source from the content-addressed store, hash-verified

234}
235
236func 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
261func freeRebaseOptions(copts *C.git_rebase_options) {
262 if copts == nil {

Callers 2

InitRebaseMethod · 0.85
OpenRebaseMethod · 0.85

Calls 4

mapEmptyStringToNullFunction · 0.85
populateMergeOptionsFunction · 0.85
populateCheckoutOptionsFunction · 0.85
TrackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…