From e4e49bb81b30ee61e3316b4acf7b3635c36b3ac3 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 1 Nov 2026 17:34:37 -1000 Subject: Say when a log search matches nothing --- source/ui-log.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source') diff --git a/source/ui-log.c b/source/ui-log.c index 5b3a88a..052d586 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -597,6 +597,11 @@ void cgit_print_log(const char *tip, int ofs, int cnt, const char *grep, const c release_commit_memory(the_repository->parsed_objects, commit); commit->parents = NULL; } + // A search that matched nothing would leave the table a header alone. + if (!i && !ofs && grep && pattern && *pattern) { + htmlf("", columns + filler); + html("No commits match the search\n"); + } if (pager) { print_pager(&rev, path, ofs, cnt); cgit_print_layout_end(); -- cgit 2.12.1