From 08ebe3498398c6e4d68fa0de2076138ad965e01e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 16:49:25 -1000 Subject: Restore HEAD however the fallback test ends HEAD was put back inside the && chain after cgit ran, so a failure left repos/rob on a missing branch for every later test. The switcher check also read the page this test left, and now runs in the same test. --- tests/t0303-robustness.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 6053de0..365c968 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -504,19 +504,16 @@ test_expect_success 'a filter pipeline sees the default SIGPIPE disposition' ' test_path_is_missing outlived ' +# Such a branch is refused as a head, so the fallback passes over it, and the +# switcher must not offer a choice that can only lead to an error page. test_expect_success 'the fallback branch skips a name spelled like an option' ' git -C repos/rob update-ref refs/heads/-first HEAD && + test_when_finished "git -C repos/rob update-ref -d refs/heads/-first" && git -C repos/rob symbolic-ref HEAD refs/heads/gone && - cgit_rc robrc "url=rob/" >tmp && - git -C repos/rob symbolic-ref HEAD refs/heads/master && - grep "^Status: 200" tmp -' - -# Such a branch is refused as a head, so the switcher must not offer a -# choice that can only lead to an error page. -test_expect_success 'the branch switcher leaves out a name spelled like an option' ' - grep "