diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
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.
Diffstat (limited to '')
-rw-r--r--source/ui-tree.c2
1 file changed, 1 insertion, 1 deletion
diff --git a/source/ui-tree.c b/source/ui-tree.c
index df7e9e5..c9da688 100644
--- a/source/ui-tree.c
+++ b/source/ui-tree.c
@@ -281,7 +281,7 @@ static void render_ls_item(const struct object_id *oid, const char *pathname,
cgit_log_link("log", NULL, "button", ctx.qry.head,
walk_tree_ctx->curr_rev, fullpath.buf, 0, NULL, NULL,
ctx.qry.showmsg, 0);
- if (ctx.repo->max_stats)
+ if (ctx.repo->enable_stats)
cgit_stats_link("stats", NULL, "button", ctx.qry.head,
fullpath.buf);
if (!S_ISGITLINK(mode))