-rw-r--r-- | cgit.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -622,2 +622,12 @@ static void cgit_parse_args(int argc, const char **argv) !strncmp(argv[i], "--scan-path=", 12)) { + /* HACK: the global snapshot bitmask defines the + * set of allowed snapshot formats, but the config + * file hasn't been parsed yet so the mask is + * currently 0. By setting all bits high before + * scanning we make sure that any in-repo cgitrc + * snapshot setting is respected by scan_tree(). + * BTW: we assume that there'll never be more than + * 255 different snapshot formats supported by cgit... + */ + ctx.cfg.snapshots = 0xFF; scan++; |