]> granicus.if.org Git - cgit/commitdiff
Add config option 'repo.section'
authorLars Hjemli <hjemli@gmail.com>
Sun, 23 Aug 2009 21:00:28 +0000 (23:00 +0200)
committerLars Hjemli <hjemli@gmail.com>
Mon, 24 Aug 2009 08:22:58 +0000 (10:22 +0200)
This option can be used to specify the section name for the current
repository.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.c
cgitrc.5.txt

diff --git a/cgit.c b/cgit.c
index 013a0feb3a3f36923c7cf59c76c964d690edaaf8..7264b8e5d9af7399d02008557f34684a365d1ebf 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -169,6 +169,8 @@ void config_cb(const char *name, const char *value)
                ctx.repo->max_stats = cgit_find_stats_period(value, NULL);
        else if (ctx.repo && !strcmp(name, "repo.module-link"))
                ctx.repo->module_link= xstrdup(value);
+       else if (ctx.repo && !strcmp(name, "repo.section"))
+               ctx.repo->section = xstrdup(value);
        else if (ctx.repo && !strcmp(name, "repo.about-filter"))
                ctx.repo->about_filter = new_filter(value, 0);
        else if (ctx.repo && !strcmp(name, "repo.commit-filter"))
index 4d009f9d943cd5922e1105fc035171db09efc494..e99c9f7b1f9765341419c17b621b98ebb5f8ca7b 100644 (file)
@@ -315,6 +315,9 @@ repo.snapshots::
        A mask of allowed snapshot-formats for this repo, restricted by the
        "snapshots" global setting. Default value: <snapshots>.
 
+repo.section::
+       Override the current section for this repository. Default value: none.
+
 repo.source-filter::
        Override the default source-filter. Default value: <source-filter>.