Skip to content

Commit

Permalink
#358 fixed printing git merge just once in mob done
Browse files Browse the repository at this point in the history
  • Loading branch information
hollesse committed Mar 9, 2023
1 parent 1253ab1 commit 28dd1d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 1 addition & 3 deletions mob.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

const (
versionNumber = "4.3.0"
versionNumber = "4.3.1"
minimumGitVersion = "2.13.0"
)

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

say.Indented(commandString)

if err != nil {
if !isGit() {
say.Error("expecting the current working directory to be a git repository.")
Expand Down
13 changes: 13 additions & 0 deletions mob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,19 @@ func TestStartDoneWithMobDoneSquash(t *testing.T) {
assertNoMobSessionBranches(t, configuration, "mob-session")
}

func TestStartDoneWithMobDoneBugMergeTwice(t *testing.T) {
output, configuration := setup(t)

start(configuration)
assertOnBranch(t, "mob-session")

done(configuration)

assertOnBranch(t, "master")
assertNoMobSessionBranches(t, configuration, "mob-session")
assertOutputNotContains(t, output, "git merge --squash --ff mob-session\n git merge --squash --ff mob-session\n")
}

func TestStartDoneSquashWithUnpushedCommit(t *testing.T) {
_, configuration := setup(t)
configuration.DoneSquash = config.Squash
Expand Down

0 comments on commit 28dd1d8

Please sign in to comment.