From 819191dad896b765d4a71a4e94d4d664cb8ee107 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 19:25:14 -1000 Subject: Show a full index page for a negative offset The query parser takes an offset as low as -1, which the stats page reads as every author, so the index clamps it for itself, as the log and refs pages already do. --- source/ui-repolist.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source') diff --git a/source/ui-repolist.c b/source/ui-repolist.c index 4f79f70..800373e 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -442,6 +442,11 @@ void cgit_print_repolist(void) else if (ctx.cfg.section_sort) sort_repolist("section"); + // An offset of -1 gets through for the stats page, where it means + // every author, and would start this page a row before the first. + if (ctx.qry.ofs < 0) + ctx.qry.ofs = 0; + currenturl = cgit_currenturl(); html("\n"); for (i = 0; i < cgit_repolist.count; i++) { -- cgit 2.12.1