From 28dd1d832fbb4b19137924bcf0ee69f0f101d3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20T=C3=B6pfer?= Date: Thu, 9 Mar 2023 15:08:51 +0100 Subject: [PATCH] #358 fixed printing git merge just once in mob done --- mob.go | 4 +--- mob_test.go | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/mob.go b/mob.go index 8c699411..53e8fd1c 100644 --- a/mob.go +++ b/mob.go @@ -26,7 +26,7 @@ import ( ) const ( - versionNumber = "4.3.0" + versionNumber = "4.3.1" minimumGitVersion = "2.13.0" ) @@ -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.") diff --git a/mob_test.go b/mob_test.go index 06198af9..2a261507 100644 --- a/mob_test.go +++ b/mob_test.go @@ -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