| 46 | } |
| 47 | |
| 48 | func sayLastCommitsWithMessage(currentBaseBranch string, currentWipBranch string) { |
| 49 | commitsBaseWipBranch := currentBaseBranch + ".." + currentWipBranch |
| 50 | log := silentgit("--no-pager", "log", commitsBaseWipBranch, "--pretty=oneline", "--abbrev-commit") |
| 51 | lines := strings.Split(log, "\n") |
| 52 | if len(lines) > 10 { |
| 53 | say.Info("wip branch '" + currentWipBranch + "' contains " + strconv.Itoa(len(lines)) + " commits. The last 10 were:") |
| 54 | lines = lines[:10] |
| 55 | } |
| 56 | output := strings.Join(lines, "\n") |
| 57 | say.Say(output) |
| 58 | } |
| 59 | |
| 60 | func setEnvGitEditor(gitEditor string, gitSequenceEditor string) { |
| 61 | os.Setenv("GIT_EDITOR", gitEditor) |