]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
git: update to v2.44.0
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 133f454b6dc0b46e74d3d753a4c910a07109e24e..e61629237cac22d9de48cf3316873cd7d0f586d4 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -142,7 +142,9 @@ static void config_cb(const char *name, const char *value)
        else if (!strcmp(name, "root-readme"))
                ctx.cfg.root_readme = xstrdup(value);
        else if (!strcmp(name, "css"))
        else if (!strcmp(name, "root-readme"))
                ctx.cfg.root_readme = xstrdup(value);
        else if (!strcmp(name, "css"))
-               ctx.cfg.css = xstrdup(value);
+               string_list_append(&ctx.cfg.css, xstrdup(value));
+       else if (!strcmp(name, "js"))
+               string_list_append(&ctx.cfg.js, xstrdup(value));
        else if (!strcmp(name, "favicon"))
                ctx.cfg.favicon = xstrdup(value);
        else if (!strcmp(name, "footer"))
        else if (!strcmp(name, "favicon"))
                ctx.cfg.favicon = xstrdup(value);
        else if (!strcmp(name, "footer"))
@@ -378,7 +380,6 @@ static void prepare_context(void)
        ctx.cfg.case_sensitive_sort = 1;
        ctx.cfg.branch_sort = 0;
        ctx.cfg.commit_sort = 0;
        ctx.cfg.case_sensitive_sort = 1;
        ctx.cfg.branch_sort = 0;
        ctx.cfg.commit_sort = 0;
-       ctx.cfg.css = "/cgit.css";
        ctx.cfg.logo = "/cgit.png";
        ctx.cfg.favicon = "/favicon.ico";
        ctx.cfg.local_time = 0;
        ctx.cfg.logo = "/cgit.png";
        ctx.cfg.favicon = "/favicon.ico";
        ctx.cfg.local_time = 0;
@@ -630,7 +631,7 @@ static int prepare_repo_cmd(int nongit)
                return 1;
        }
 
                return 1;
        }
 
-       if (get_oid(ctx.qry.head, &oid)) {
+       if (repo_get_oid(the_repository, ctx.qry.head, &oid)) {
                char *old_head = ctx.qry.head;
                ctx.qry.head = xstrdup(ctx.repo->defbranch);
                cgit_print_error_page(404, "Not found",
                char *old_head = ctx.qry.head;
                ctx.qry.head = xstrdup(ctx.repo->defbranch);
                cgit_print_error_page(404, "Not found",