Commit commits the current patch. You must have resolved any conflicts that were introduced during the patch application from the Next() invocation.
(ID *Oid, author, committer *Signature, message string)
| 416 | // Commit commits the current patch. |
| 417 | // You must have resolved any conflicts that were introduced during the patch application from the Next() invocation. |
| 418 | func (rebase *Rebase) Commit(ID *Oid, author, committer *Signature, message string) error { |
| 419 | runtime.LockOSThread() |
| 420 | defer runtime.UnlockOSThread() |
| 421 | |
| 422 | authorSig, err := author.toC() |
| 423 | if err != nil { |
| 424 | return err |
| 425 | } |
| 426 | defer C.git_signature_free(authorSig) |
| 427 | |
| 428 | committerSig, err := committer.toC() |
| 429 | if err != nil { |
| 430 | return err |
| 431 | } |
| 432 | defer C.git_signature_free(committerSig) |
| 433 | |
| 434 | cmsg := C.CString(message) |
| 435 | defer C.free(unsafe.Pointer(cmsg)) |
| 436 | |
| 437 | cerr := C.git_rebase_commit(ID.toC(), rebase.ptr, authorSig, committerSig, nil, cmsg) |
| 438 | runtime.KeepAlive(ID) |
| 439 | runtime.KeepAlive(rebase) |
| 440 | if cerr < 0 { |
| 441 | return MakeGitError(cerr) |
| 442 | } |
| 443 | |
| 444 | return nil |
| 445 | } |
| 446 | |
| 447 | // Finish finishes a rebase that is currently in progress once all patches have been applied. |
| 448 | func (rebase *Rebase) Finish() error { |