From 4b0dc324d0103dc16a869a71ec30fae5364d4967 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 06:13:31 -1000 Subject: Skip an indented comment in the mimetype file Only a hash in the first column marked a comment, so an indented one was read as the type "#" for every word after it. The manual already describes comments by their first non-blank character. --- tests/t0303-robustness.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 1963a2e..3f9c80d 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -449,6 +449,12 @@ test_expect_success 'a blank line in the mimetype file is skipped' ' grep "^Content-Type: image/x-cgit" tmp ' +test_expect_success 'an indented comment in the mimetype file is skipped' ' + printf " # cgt used to be image/x-old\nimage/x-cgit cgt\n" >mime.types && + CGIT_CONFIG="$PWD/mimerc" QUERY_STRING="url=rob/plain/note.cgt" cgit >tmp && + grep "^Content-Type: image/x-cgit" tmp +' + test_expect_success 'a refs page named with an id is not cached for ever' ' mkdir -p cache && { -- cgit