From a3bb7c69c0295cb2fc7909559456e798b222fccd Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:56:59 -0700 Subject: Add the shared config writers and cgit_rc The helpers are named by kind. cgitrc_repo and cgitrc_copy write the config file named first, and cgit_url, cgit_query and cgit_rc run cgit, each named after what it is handed first. A repository copies its defaults from the globals read before its repo.url, so cgitrc_repo places every setting itself, and a global can no longer land where it silently stops applying. The t00xx and t01xx files move to them here. --- tests/t0109-patch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/t0109-patch.sh') diff --git a/tests/t0109-patch.sh b/tests/t0109-patch.sh index 5c528fc..52f2abc 100755 --- a/tests/t0109-patch.sh +++ b/tests/t0109-patch.sh @@ -60,7 +60,7 @@ test_expect_success 'max-patch-count bounds a patch range' ' echo "repo.url=foo" && echo "repo.path=$PWD/repos/foo/.git" } >patchcountrc && - CGIT_CONFIG="$PWD/patchcountrc" QUERY_STRING="url=foo/patch&id=$id&id2=$root" cgit >tmp && + cgit_rc patchcountrc "url=foo/patch&id=$id&id2=$root" >tmp && test $(grep -c "^From " tmp) -eq 2 ' @@ -69,7 +69,7 @@ test_expect_success 'the signature names the version when asked to' ' echo "enable-version-info=1" && sed "s/^cache-size=.*/cache-size=0/" cgitrc } >versionrc && - CGIT_CONFIG="$PWD/versionrc" QUERY_STRING="url=foo/patch" cgit >tmp && + cgit_rc versionrc "url=foo/patch" >tmp && check_cgit_signature "$CGIT_VERSION" ' -- cgit