From: SZEDER Gábor Date: Mon, 01 Jan 2018 22:54:47 GMT Subject: [PATCH 3/4] t3200: restore branch after "unborn --edit-description" test Message-ID: <20180101225448.2561-4-szeder.dev@gmail.com> In-Reply-To: <20180101225448.2561-1-szeder.dev@gmail.com> The test 'refuse --edit-description on unborn branch for now' switches to an orphan branch and leaves the test repository in that state. This might badly influence the subsequent test expecting 'git branch --merged' to error out, by hiding a potential regression with an error triggered by the unborn branch. Furthermore, a new test that will be added later in this series failed first because of this. Use test_when_finished to switch back to the master branch at the end of the test in question. Signed-off-by: SZEDER Gábor --- t/t3200-branch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index e9f55ac04..427ad490d 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -1234,6 +1234,7 @@ test_expect_success 'refuse --edit-description on unborn branch for now' ' write_script editor <<-\EOF && echo "New contents" >"$1" EOF + test_when_finished git checkout master && git checkout --orphan unborn && test_must_fail env EDITOR=./editor git branch --edit-description ' -- 2.16.0.rc0.67.g3a46dbca7