X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/3ff58ddd51bcbcbc9b7649bad1a39aa98af4b49f..681fdc45473143de3f3c5f69fbc7b94f5d6b0b75:/cgit.c?ds=sidebyside diff --git a/cgit.c b/cgit.c index dc1c2e4..ae20257 100644 --- a/cgit.c +++ b/cgit.c @@ -286,6 +286,8 @@ static int prepare_repo_cmd(struct cgit_context *ctx) if (get_sha1(ctx->qry.head, sha1)) { tmp = xstrdup(ctx->qry.head); ctx->qry.head = ctx->repo->defbranch; + ctx->page.status = 404; + ctx->page.statusmsg = "not found"; cgit_print_http_headers(ctx); cgit_print_docstart(ctx); cgit_print_pageheader(ctx);