]> git.cameronkatri.com Git - cgit.git/commitdiff
config: record repo.snapshot-prefix in the per-repo config
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>
Tue, 17 Jul 2018 16:38:22 +0000 (12:38 -0400)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 3 Aug 2018 14:12:21 +0000 (16:12 +0200)
Even if we find snapshot-prefix in the repo configuration, we are not
writing it out into the rc- file, so setting the value does not have any
effect.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
cgit.c

diff --git a/cgit.c b/cgit.c
index fda0aa4b5ff87fa95690f95698406c661ba8f63f..6301b87c8ad3d29826e0fc585d6e494bcc9990bd 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -830,6 +830,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));