From 1c12802497166ddfd51af73b04690841817529c6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 19 Jul 2026 20:18:37 -1000 Subject: Gate the stats page and add a language breakdown The max-stats setting now only bounds the selectable periods 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 2.12.1