From 8a7aa400143f3e95b3ecd18f19e21b526d6a419d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 19:47:34 -1000 Subject: Read the description file without repo.desc Only a scanned repository fell back to its description file, so one listed in cgitrc without repo.desc showed "[no description]" however its file read. repo.desc may follow repo.path, so the file is read where a page shows the description, which also spares every other request the reads. --- source/ui-repolist.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/ui-repolist.c') diff --git a/source/ui-repolist.c b/source/ui-repolist.c index 4e4f61b..87abf0b 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -392,6 +392,11 @@ void cgit_print_repolist(void) int shown = 0; int i; + // Ahead of the search and the sort, which both look at descriptions. + for (i = 0; i < cgit_repolist.count; i++) + if (!cgit_repolist.repos[i].hide && !cgit_repolist.repos[i].ignore) + cgit_read_repo_desc(&cgit_repolist.repos[i]); + if (!any_repos_visible()) { cgit_print_error_page(404, "Not Found", "No repositories found"); return; -- cgit 2.12.1