From f42b5912e576229a1f034d884c9ed042292d8aa7 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Tue, 3 Nov 2026 20:33:27 -1000 Subject: State once that cgitrc is read in order The rule was written down only under scan-path, so a setting such as enable-blame=1 added at the end of cgitrc silently did nothing. --- MANUAL.txt | 8 ++++++++ custom/cgitrc | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/MANUAL.txt b/MANUAL.txt index ce440c8..6f34e4e 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -16,6 +16,14 @@ use its value instead. Global settings --------------- +cgitrc is read from the top down. Each repository copies the global settings +it can override with a repo.* form, and the current section, when its repo.url +line or the scan-path that finds it is read, so such a setting placed below a +repository does not reach it. logo, logo-link and readme are the exception, +since a repository without its own falls back to them once the whole file is +read. Every other global setting applies wherever it stands, apart from those +whose entry says to define them prior to scan-path. + about-filter:: Specifies a command which will be invoked to format the content of about pages (both top-level and for each repository). When no about-filter is diff --git a/custom/cgitrc b/custom/cgitrc index 427ced0..a29da89 100644 --- a/custom/cgitrc +++ b/custom/cgitrc @@ -11,6 +11,10 @@ # file. # # One key=value pair per line. Lines starting with # or ; are comments. +# +# cgit reads the file from the top down. Most settings a repository can override +# with a repo.* line reach only the repositories defined after them, so add +# global settings above the scan-path and repo.url lines rather than at the end. # Maximum number of entries in the cgit output cache. A value of 0 disables # caching. Value is an integer. Default is 0. -- cgit 2.12.1