2
0
mirror of https://git.zx2c4.com/cgit synced 2025-08-31 06:15:08 +00:00

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>
This commit is contained in:
Lars Hjemli
2009-08-09 13:22:00 +02:00
parent f35db1cd2b
commit e976df2795
6 changed files with 35 additions and 21 deletions

4
cgit.c
View File

@@ -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);