]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
ui-tree: allow per repository override for enable-blame
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index fda0aa4b5ff87fa95690f95698406c661ba8f63f..2910d4b861d76df28b14f6712d30e3568f4ab65b 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -50,6 +50,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
                repo->extra_head_content = xstrdup(value);
        else if (!strcmp(name, "snapshots"))
                repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value);
+       else if (!strcmp(name, "enable-blame"))
+               repo->enable_blame = atoi(value);
        else if (!strcmp(name, "enable-commit-graph"))
                repo->enable_commit_graph = atoi(value);
        else if (!strcmp(name, "enable-log-filecount"))
@@ -645,7 +647,7 @@ static inline void open_auth_filter(const char *function)
                ctx.env.https ? ctx.env.https : "",
                ctx.qry.repo ? ctx.qry.repo : "",
                ctx.qry.page ? ctx.qry.page : "",
-               ctx.qry.url ? ctx.qry.url : "",
+               cgit_currentfullurl(),
                cgit_loginurl());
 }
 
@@ -809,6 +811,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
                fprintf(f, "repo.homepage=%s\n", repo->homepage);
        if (repo->clone_url)
                fprintf(f, "repo.clone-url=%s\n", repo->clone_url);
+       fprintf(f, "repo.enable-blame=%d\n",
+               repo->enable_blame);
        fprintf(f, "repo.enable-commit-graph=%d\n",
                repo->enable_commit_graph);
        fprintf(f, "repo.enable-log-filecount=%d\n",
@@ -830,6 +834,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
                fprintf(f, "repo.snapshots=%s\n", tmp ? tmp : "");
                free(tmp);
        }
+       if (repo->snapshot_prefix)
+               fprintf(f, "repo.snapshot-prefix=%s\n", repo->snapshot_prefix);
        if (repo->max_stats != ctx.cfg.max_stats)
                fprintf(f, "repo.max-stats=%s\n",
                        cgit_find_stats_periodname(repo->max_stats));