X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/93397a765b9d9af11b7d10c114406e303ea4fb1c..d529c6fbdca7ce3782e75b3a74baad21ef2f92c3:/cgit.c diff --git a/cgit.c b/cgit.c index 5a93fcd..6e5215e 100644 --- a/cgit.c +++ b/cgit.c @@ -254,6 +254,7 @@ static int prepare_repo_cmd(struct cgit_context *ctx) ctx->page.title = fmt("%s - %s", ctx->repo->name, ctx->repo->desc); if (!ctx->qry.head) { + ctx->qry.nohead = 1; ctx->qry.head = find_default_branch(ctx->repo); ctx->repo->defbranch = ctx->qry.head; } @@ -288,7 +289,6 @@ static void process_request(void *cbdata) cmd = cgit_get_cmd(ctx); if (!cmd) { ctx->page.title = "cgit error"; - ctx->repo = NULL; cgit_print_http_headers(ctx); cgit_print_docstart(ctx); cgit_print_pageheader(ctx);