]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
snapshot: strip bit from struct cgit_snapshot_format
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index bd9cb3fb11a66383d56256b2c0426e0070e7208c..ca0a89c0a17d7b23bfb7facb2299ca537242ad9d 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -79,6 +79,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
                item->util = xstrdup(value);
        } else if (!strcmp(name, "section"))
                repo->section = xstrdup(value);
+       else if (!strcmp(name, "snapshot-prefix"))
+               repo->snapshot_prefix = xstrdup(value);
        else if (!strcmp(name, "readme") && value != NULL) {
                if (repo->readme.items == ctx.cfg.readme.items)
                        memset(&repo->readme, 0, sizeof(repo->readme));
@@ -763,7 +765,7 @@ static char *build_snapshot_setting(int bitmap)
        struct strbuf result = STRBUF_INIT;
 
        for (f = cgit_snapshot_formats; f->suffix; f++) {
-               if (f->bit & bitmap) {
+               if (cgit_snapshot_format_bit(f) & bitmap) {
                        if (result.len)
                                strbuf_addch(&result, ' ');
                        strbuf_addstr(&result, f->suffix);