From 46b7abed99e957008c01c02cf612aa526ba92f04 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Fri, 31 Jul 2009 16:55:27 +0200 Subject: ui-tree: add support for source-filter option This new option is used to specify an external command which will be executed when displaying blob content in the tree view. Blob content will be written to STDIN of the filter and STDOUT from the filter will be included verbatim in the html output from cgit. The file name of the blob will be passed as the only argument to the filter command. Signed-off-by: Lars Hjemli --- cgit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cgit.c') diff --git a/cgit.c b/cgit.c index 779a464..eb7b45d 100644 --- a/cgit.c +++ b/cgit.c @@ -100,6 +100,8 @@ void config_cb(const char *name, const char *value) ctx.cfg.max_repo_count = atoi(value); else if (!strcmp(name, "max-commit-count")) ctx.cfg.max_commit_count = atoi(value); + else if (!strcmp(name, "source-filter")) + ctx.cfg.source_filter = new_filter(value, 1); else if (!strcmp(name, "summary-log")) ctx.cfg.summary_log = atoi(value); else if (!strcmp(name, "summary-branches")) -- cgit v1.2.3-59-g8ed1b