From a3ef996f04db6a46e41575ca5a0442cdd709e485 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 4 Nov 2026 21:45:26 -1000 Subject: Answer an empty repository's feed with a feed --- source/ui-atom.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/ui-atom.c') diff --git a/source/ui-atom.c b/source/ui-atom.c index b9762b1..dea9360 100644 --- a/source/ui-atom.c +++ b/source/ui-atom.c @@ -167,6 +167,10 @@ void cgit_print_atom(char *tip, const char *path, int max_count) argv[1] = "--all"; else if (!tip) argv[1] = ctx.qry.head; + // An empty repository has no head, and a walk given nowhere to start + // leaves the feed without entries. + if (!argv[1]) + argc = 1; if (path) { argv[argc++] = "--"; -- cgit 2.12.1