(ours *Commit, theirs *Commit, options *MergeOptions)
| 264 | } |
| 265 | |
| 266 | func (r *Repository) MergeCommits(ours *Commit, theirs *Commit, options *MergeOptions) (*Index, error) { |
| 267 | runtime.LockOSThread() |
| 268 | defer runtime.UnlockOSThread() |
| 269 | |
| 270 | copts := populateMergeOptions(&C.git_merge_options{}, options) |
| 271 | defer freeMergeOptions(copts) |
| 272 | |
| 273 | var ptr *C.git_index |
| 274 | ret := C.git_merge_commits(&ptr, r.ptr, ours.cast_ptr, theirs.cast_ptr, copts) |
| 275 | runtime.KeepAlive(ours) |
| 276 | runtime.KeepAlive(theirs) |
| 277 | if ret < 0 { |
| 278 | return nil, MakeGitError(ret) |
| 279 | } |
| 280 | |
| 281 | return newIndexFromC(ptr, r), nil |
| 282 | } |
| 283 | |
| 284 | func (r *Repository) MergeTrees(ancestor *Tree, ours *Tree, theirs *Tree, options *MergeOptions) (*Index, error) { |
| 285 | runtime.LockOSThread() |
nothing calls this directly
no test coverage detected