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/cgit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/cgit.c') diff --git a/source/cgit.c b/source/cgit.c index d982fdb..12ed19e 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -1241,6 +1241,10 @@ static int prepare_repo_cmd(int nongit, int err, int clone) // and those clone urls expand macros such // as $CGIT_REPO_URL out of this environment. prepare_repo_env(ctx.repo); + // A feed reader cannot read the page below, so the feed goes + // out with no entries. + if (!strcmp(ctx.qry.page, "atom")) + return 0; cgit_print_layout_start(); cgit_print_empty_repo(); cgit_print_layout_end(); -- cgit 2.12.1