From ffd23bfd13a2f009f4c1c6b355a5f895969f81fd Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 20 Jul 2026 10:18:48 -1000 Subject: Gate the stats page and add a language breakdown `max-stats` only bounds the selectable periods now and no longer doubles as the enable switch. The tree walk runs before the history walk on purpose. Releasing commit memory while walking history resets each commit slab index, and a commit graph lookup afterwards would read another commit slot and walk the wrong tree. The stats fixture writes a commit graph so the tests cover that path. The history walk bounds the window in process rather than passing a formatted since date to `setup_revisions`, and parses each commit once. --- examples/cgitrc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'examples') diff --git a/examples/cgitrc b/examples/cgitrc index 0e82bd2..5626b58 100644 --- a/examples/cgitrc +++ b/examples/cgitrc @@ -245,6 +245,11 @@ enable-markdown=1 # Values are week, month, quarter or year. Default is unset. #max-stats=week +# Enable the statistics page, with the repository overview, activity +# timeline, commit rhythm, language breakdown and commits per author. +# Values are 0 or 1. Default is 0. +enable-stats=0 + ## ## Snapshots and cloning -- cgit v2.8.0