From mboxrd@z Thu Jan 1 00:00:00 1970 From: asjo at koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Date: Sat, 01 Dec 2012 23:02:17 +0100 Subject: [PATCH] Return "404 Not found" if a repo doesn't exist (any more). Message-ID: <87sj7pa0t2.fsf@topper.koldfront.dk> If a repository disappears, cgit says "No repositories found" and returns "200 OK" [to the webcrawler] for pages referring to, say, commits in the, now, missing repository. This, slightly awkward, patch makes it return "404 Not found" in this case. There is probably a better way to do this. --- ui-repolist.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ui-repolist.c b/ui-repolist.c index dead1bf..ca65d44 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -247,6 +247,17 @@ void cgit_print_repolist() if (ctx.cfg.enable_index_links) columns++; + for (i=0; i