]> granicus.if.org Git - cgit/commitdiff
cgit.c: sync repo config printing with struct cgit_repo
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 25 May 2013 12:05:06 +0000 (14:05 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 25 May 2013 12:07:10 +0000 (14:07 +0200)
We've now added quite a few config keys for repositories, but we've
forgotten to update the printing of it for cache files. Synchronize the
two.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
cgit.c

diff --git a/cgit.c b/cgit.c
index 6f44ef2691329881de407d5e577c8d6d84c7dfca..e3ec533e0719ac1f34623dab2977d0a6c87af274 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -678,6 +678,20 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
        if (repo->max_stats != ctx.cfg.max_stats)
                fprintf(f, "repo.max-stats=%s\n",
                        cgit_find_stats_periodname(repo->max_stats));
+       if (repo->logo)
+               fprintf(f, "repo.logo=%s\n", repo->logo);
+       if (repo->logo_link)
+               fprintf(f, "repo.logo-link=%s\n", repo->logo_link);
+       fprintf(f, "repo.enable-remote-branches=%d\n", repo->enable_remote_branches);
+       fprintf(f, "repo.enable-subject-links=%d\n", repo->enable_subject_links);
+       if (repo->branch_sort == 1)
+               fprintf(f, "repo.branch-sort=age\n");
+       if (repo->commit_sort) {
+               if (repo->commit_sort == 1)
+                       fprintf(f, "repo.commit-sort=date\n");
+               else if (repo->commit_sort == 2)
+                       fprintf(f, "repo.commit-sort=topo\n");
+       }
        fprintf(f, "\n");
 }