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. --- source/ui-shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/ui-shared.c') diff --git a/source/ui-shared.c b/source/ui-shared.c index 2f64c60..477314c 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1143,7 +1143,7 @@ void cgit_print_pageheader(void) hc("diff"), ctx.qry.head, ctx.qry.oid, ctx.qry.oid2, ctx.qry.vpath); html("\n"); - if (ctx.repo->max_stats) { + if (ctx.repo->enable_stats) { html("
  • "); cgit_stats_link("stats", "Commit activity", hc("stats"), ctx.qry.head, ctx.qry.vpath); -- cgit v2.8.0