Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'source/ui-repolist.c')
| -rw-r--r-- | source/ui-repolist.c | 5 |
1 file changed, 5 insertions, 0 deletions
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; |
