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/t0111-atom.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/t0111-atom.sh') diff --git a/tests/t0111-atom.sh b/tests/t0111-atom.sh index ccc8a2f..443ac77 100755 --- a/tests/t0111-atom.sh +++ b/tests/t0111-atom.sh @@ -34,14 +34,8 @@ test_expect_success 'ten entries is the default ceiling' ' ' test_expect_success 'max-atom-items overrides the ceiling' ' - { - echo "virtual-root=/" && - echo "cache-size=0" && - echo "max-atom-items=3" && - echo "repo.url=bar" && - echo "repo.path=$PWD/repos/bar/.git" - } >atomrc && - CGIT_CONFIG="$PWD/atomrc" QUERY_STRING="url=bar/atom" cgit >tmp && + cgitrc_repo atomrc bar max-atom-items=3 && + cgit_rc atomrc "url=bar/atom" >tmp && strip_headers feed && test $(grep -c "" feed) -eq 3 ' -- cgit