]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
Introduce 'section' as canonical spelling for 'repo.group'
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 6ece4116460a171eb7597c00cccf48cb073e816b..013a0feb3a3f36923c7cf59c76c964d690edaaf8 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -143,8 +143,8 @@ void config_cb(const char *name, const char *value)
                ctx.cfg.local_time = atoi(value);
        else if (!prefixcmp(name, "mimetype."))
                add_mimetype(name + 9, value);
-       else if (!strcmp(name, "repo.group"))
-               ctx.cfg.repo_group = xstrdup(value);
+       else if (!strcmp(name, "section") || !strcmp(name, "repo.group"))
+               ctx.cfg.section = xstrdup(value);
        else if (!strcmp(name, "repo.url"))
                ctx.repo = cgit_add_repo(value);
        else if (!strcmp(name, "repo.name"))
@@ -547,7 +547,8 @@ static void cgit_parse_args(int argc, const char **argv)
                if (!strncmp(argv[i], "--ofs=", 6)) {
                        ctx.qry.ofs = atoi(argv[i]+6);
                }
-               if (!strncmp(argv[i], "--scan-tree=", 12)) {
+               if (!strncmp(argv[i], "--scan-tree=", 12) ||
+                   !strncmp(argv[i], "--scan-path=", 12)) {
                        scan++;
                        scan_tree(argv[i] + 12);
                }