From 6c28482dbbec61808606f1e3a7d6dc9a226cea5d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:18 -1000 Subject: Say why an oversized readme leaves about empty A readme past max-blob-size is never read, which left the about page with an empty block and no word of why. --- tests/t0303-robustness.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 848b03a..d2bf79f 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -755,4 +755,19 @@ test_expect_success SANITY 'a scan entry that cannot be searched is named in ful grep "Unable to stat .*scanperm/locked/objects: Permission denied" err ' +# A readme past max-blob-size is never read, so the about page says why it +# has nothing to show. +test_expect_success 'a readme past max-blob-size is reported on the about page' ' + test_seq 1 1000 >repos/rob/big-readme && + git -C repos/rob add big-readme && + git -C repos/rob commit -q -m "big readme" && + { + echo "max-blob-size=1" && + cat robrc && + echo "repo.readme=:big-readme" + } >bigreadmerc && + CGIT_CONFIG="$PWD/bigreadmerc" QUERY_STRING="url=rob/about/" cgit >tmp && + grep "The readme is larger than max-blob-size (1 KB)" tmp +' + test_done -- cgit