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

Function populateApplyOptions

diff.go:976–994  ·  view source on GitHub ↗
(copts *C.git_apply_options, opts *ApplyOptions, errorTarget *error)

Source from the content-addressed store, hash-verified

974}
975
976func populateApplyOptions(copts *C.git_apply_options, opts *ApplyOptions, errorTarget *error) *C.git_apply_options {
977 C.git_apply_options_init(copts, C.GIT_APPLY_OPTIONS_VERSION)
978 if opts == nil {
979 return nil
980 }
981
982 copts.flags = C.uint(opts.Flags)
983
984 if opts.ApplyDeltaCallback != nil || opts.ApplyHunkCallback != nil {
985 data := &applyCallbackData{
986 options: opts,
987 errorTarget: errorTarget,
988 }
989 C._go_git_populate_apply_callbacks(copts)
990 copts.payload = pointerHandles.Track(data)
991 }
992
993 return copts
994}
995
996func freeApplyOptions(copts *C.git_apply_options) {
997 if copts == nil {

Callers 2

ApplyDiffMethod · 0.85
ApplyToTreeMethod · 0.85

Calls 1

TrackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…