aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorGravatar Lars Hjemli <hjemli@gmail.com>2009-08-09 20:27:21 (JST)
committerGravatar Lars Hjemli <hjemli@gmail.com>2009-08-09 20:41:54 (JST)
commit537c05f138d59c1eb3ac8e2d8b0dca3a38aa5dd4 (patch)
tree73b1d25a96dd171c5503fae1fefc6a27a7d58683 /cgit.c
parente1782fff8a78b7f265432603351281ad2988bb40 (diff)
downloadcgit-537c05f138d59c1eb3ac8e2d8b0dca3a38aa5dd4.zip
cgit-537c05f138d59c1eb3ac8e2d8b0dca3a38aa5dd4.tar.gz
Add 'about-filter' and 'repo.about-filter' options
These options can be used to execute a filter command on each about-page, both top-level and for each repository (repo.about-filter can be used to override the current about-filter). 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 b3a98c1..cb1149d 100644
--- a/cgit.c
+++ b/cgit.c
@@ -90,6 +90,8 @@ void config_cb(const char *name, const char *value)
90 ctx.cfg.cache_static_ttl = atoi(value); 90 ctx.cfg.cache_static_ttl = atoi(value);
91 else if (!strcmp(name, "cache-dynamic-ttl")) 91 else if (!strcmp(name, "cache-dynamic-ttl"))
92 ctx.cfg.cache_dynamic_ttl = atoi(value); 92 ctx.cfg.cache_dynamic_ttl = atoi(value);
93 else if (!strcmp(name, "about-filter"))
94 ctx.cfg.about_filter = new_filter(value, 0);
93 else if (!strcmp(name, "commit-filter")) 95 else if (!strcmp(name, "commit-filter"))
94 ctx.cfg.commit_filter = new_filter(value, 0); 96 ctx.cfg.commit_filter = new_filter(value, 0);
95 else if (!strcmp(name, "embedded")) 97 else if (!strcmp(name, "embedded"))
@@ -146,6 +148,8 @@ void config_cb(const char *name, const char *value)
146 ctx.repo->max_stats = cgit_find_stats_period(value, NULL); 148 ctx.repo->max_stats = cgit_find_stats_period(value, NULL);
147 else if (ctx.repo && !strcmp(name, "repo.module-link")) 149 else if (ctx.repo && !strcmp(name, "repo.module-link"))
148 ctx.repo->module_link= xstrdup(value); 150 ctx.repo->module_link= xstrdup(value);
151 else if (ctx.repo && !strcmp(name, "repo.about-filter"))
152 ctx.repo->about_filter = new_filter(value, 0);
149 else if (ctx.repo && !strcmp(name, "repo.commit-filter")) 153 else if (ctx.repo && !strcmp(name, "repo.commit-filter"))
150 ctx.repo->commit_filter = new_filter(value, 0); 154 ctx.repo->commit_filter = new_filter(value, 0);
151 else if (ctx.repo && !strcmp(name, "repo.source-filter")) 155 else if (ctx.repo && !strcmp(name, "repo.source-filter"))