Skip to content

Commit c1e4141

Browse files
authored
Merge pull request #367 from remotemobprogramming/mob-done-merge-bug
#358 fixed printing git merge just once in mob done
2 parents bb6f162 + 28dd1d8 commit c1e4141

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

mob.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
)
2727

2828
const (
29-
versionNumber = "4.3.0"
29+
versionNumber = "4.3.1"
3030
minimumGitVersion = "2.13.0"
3131
)
3232

@@ -1404,8 +1404,6 @@ func gitIgnoreFailure(args ...string) error {
14041404
commandString, output, err = runCommandSilent("git", args...)
14051405
}
14061406

1407-
say.Indented(commandString)
1408-
14091407
if err != nil {
14101408
if !isGit() {
14111409
say.Error("expecting the current working directory to be a git repository.")

mob_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,19 @@ func TestStartDoneWithMobDoneSquash(t *testing.T) {
918918
assertNoMobSessionBranches(t, configuration, "mob-session")
919919
}
920920

921+
func TestStartDoneWithMobDoneBugMergeTwice(t *testing.T) {
922+
output, configuration := setup(t)
923+
924+
start(configuration)
925+
assertOnBranch(t, "mob-session")
926+
927+
done(configuration)
928+
929+
assertOnBranch(t, "master")
930+
assertNoMobSessionBranches(t, configuration, "mob-session")
931+
assertOutputNotContains(t, output, "git merge --squash --ff mob-session\n git merge --squash --ff mob-session\n")
932+
}
933+
921934
func TestStartDoneSquashWithUnpushedCommit(t *testing.T) {
922935
_, configuration := setup(t)
923936
configuration.DoneSquash = config.Squash

0 commit comments

Comments
 (0)