aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2009-08-09 13:22:00 +0200
committerLars Hjemli <hjemli@gmail.com>2009-08-09 13:22:00 +0200
commite976df27952ca1e450c1c3d420532ac9f5e3036b (patch)
tree2634538f3144c935d1579315d4de289e6c890f19 /cgit.c
parentf35db1cd2b75aac6952aa07713e44ca01fd89727 (diff)
downloadcgit-e976df27952ca1e450c1c3d420532ac9f5e3036b.tar.gz
cgit-e976df27952ca1e450c1c3d420532ac9f5e3036b.tar.xz
Add support for repo.commit-filter and repo.source-filter
These options can be used to override the default commit- and source- filter settings per repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 2cda554..fd341b8 100644
--- a/cgit.c
+++ b/cgit.c
@@ -146,6 +146,10 @@ 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.commit-filter"))
+ ctx.repo->commit_filter = new_filter(value, 0);
+ else if (ctx.repo && !strcmp(name, "repo.source-filter"))
+ ctx.repo->source_filter = new_filter(value, 1);
else if (ctx.repo && !strcmp(name, "repo.readme") && value != NULL) {
if (*value == '/')
ctx.repo->readme = xstrdup(value);