From 897c53b3c67ac935e846eb324002b647c61a0843 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 18:12:37 -1000 Subject: Name the log link that enable-index-links adds The manual has named the commit page since it was written in 2008, a year after the index started linking the log instead. --- MANUAL.txt | 2 +- custom/cgitrc | 2 +- tests/t0101-index.sh | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index 6ea6266..1c24e1a 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -230,7 +230,7 @@ enable-http-clone:: enable-index-links:: Flag which, when set to "1", makes cgit generate extra links for each - repository in the index, to the "summary", "commit" and "tree" pages. + repository in the index, to the "summary", "log" and "tree" pages. Default value: "0". enable-index-owner:: diff --git a/custom/cgitrc b/custom/cgitrc index 2dd738b..9b4b8cf 100644 --- a/custom/cgitrc +++ b/custom/cgitrc @@ -197,7 +197,7 @@ enable-follow-links=0 # module-link template covers. Values are 0 or 1. Default is 0. enable-gitmodules-links=0 -# Generate extra summary, commit and tree links per repository on the index. +# Generate extra summary, log and tree links per repository on the index. # Values are 0 or 1. Default is 0. enable-index-links=0 diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index 60f71e8..fce9e99 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -3,7 +3,8 @@ # The index page, one row per repository in cgitrc. The checks look for each # fixture repository and its description, for the escaping a name with a # plus or a space needs in a link, and for the absence of the tree and log -# links that belong to a repository's own pages. +# links that belong to a repository's own pages unless enable-index-links +# asks for them. test_description='Check content on index page' . ./setup.sh @@ -19,4 +20,12 @@ test_expect_success 'verify "with%20space" link' 'grep "/with%20space/" tmp' test_expect_success 'no tree-link' '! grep "foo/tree" tmp' test_expect_success 'no log-link' '! grep "foo/log" tmp' +test_expect_success 'index links lead to the summary, log and tree' ' + echo "enable-index-links=1" >links-cgitrc && + sed "s/^cache-size=.*/cache-size=0/" cgitrc >>links-cgitrc && + CGIT_CONFIG="$PWD/links-cgitrc" QUERY_STRING="url=" cgit >tmp && + grep ">summarylog" tmp && + grep "href=./foo/log/.>logtree<" tmp +' + test_done -- cgit