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 <szeder.dev@xxxxxxxxx> --- 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