MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / sayLastCommitsWithMessage

Function sayLastCommitsWithMessage

squash_wip.go:48–58  ·  view source on GitHub ↗
(currentBaseBranch string, currentWipBranch string)

Source from the content-addressed store, hash-verified

46}
47
48func 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
60func setEnvGitEditor(gitEditor string, gitSequenceEditor string) {
61 os.Setenv("GIT_EDITOR", gitEditor)

Callers 1

squashWipFunction · 0.85

Calls 3

InfoFunction · 0.92
SayFunction · 0.92
silentgitFunction · 0.85

Tested by

no test coverage detected