@matheusbsbs / matheus-bagliano / commits / e6d5a11fed
Fork 0

t3200: clean side effect of git checkout --orphan

The "refuse --edit-description on unborn branch for now" test in t3200 switches to an orphan branch, causing subsequent git commands referencing HEAD to fail. Avoid this side-effect by switching back to master after the test finishes. This has gone undetected, as the next affected test expects failure - but it currently fails for the wrong reason. Verbose output of the next test referencing HEAD, "--merged is incompatible with --no-merged": fatal: malformed object name HEAD Which this commit corrects to: error: option `no-merged' is incompatible with --merged Signed-off-by: Aaron Lipman <alipman88@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Aaron Lipman committed Aug 30, 2020 at 18:42 UTC e6d5a11fed0bd6871a16e9004d960f1447529e67
1 file changed +1
t/t3200-branch.sh
+1
@@ -1287,6 +1287,7 @@ test_expect_success 'detect typo in branch name when using --edit-description' '
1287 '
1288
1289 test_expect_success 'refuse --edit-description on unborn branch for now' '
1290 + test_when_finished "git checkout master" &&
1291 write_script editor <<-\EOF &&
1292 echo "New contents" >"$1"
1293 EOF