(copts *C.git_apply_options, opts *ApplyOptions, errorTarget *error)
| 974 | } |
| 975 | |
| 976 | func 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 | |
| 996 | func freeApplyOptions(copts *C.git_apply_options) { |
| 997 | if copts == nil { |
no test coverage detected
searching dependent graphs…