]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
Makefile: install cgit.{css,png} in CGIT_DATA_PATH
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 5a93fcdc6376a9a1ad7ac1f7090988c624481294..6e5215e3b08edcbc5c09b9faf22a753762d0767c 100644 (file)
--- 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->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;
        }
                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";
        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);
                cgit_print_http_headers(ctx);
                cgit_print_docstart(ctx);
                cgit_print_pageheader(ctx);