MergeAndSignRef merges the given ref into the current one and signs the merge. The ref argument is the ref to merge, and fastForward indicates that the current ref should only move forward, as opposed to creating a bubble merge. The messages argument(s) provide text that should be included in the d
(ref string, fastForward bool, messages ...string)
| 461 | // The messages argument(s) provide text that should be included in the default |
| 462 | // merge commit message (separated by blank lines). |
| 463 | func (repo *GitRepo) MergeAndSignRef(ref string, fastForward bool, |
| 464 | messages ...string) error { |
| 465 | |
| 466 | args := []string{"merge"} |
| 467 | if fastForward { |
| 468 | args = append(args, "--ff", "--ff-only", "-S") |
| 469 | } else { |
| 470 | args = append(args, "--no-ff", "-S") |
| 471 | } |
| 472 | if len(messages) > 0 { |
| 473 | commitMessage := strings.Join(messages, "\n\n") |
| 474 | args = append(args, "-e", "-m", commitMessage) |
| 475 | } |
| 476 | args = append(args, ref) |
| 477 | return repo.runGitCommandInline(args...) |
| 478 | } |
| 479 | |
| 480 | // RebaseRef rebases the current ref onto the given one. |
| 481 | func (repo *GitRepo) RebaseRef(ref string) error { |
nothing calls this directly
no test coverage detected