summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c2
-rw-r--r--cgit.h1
-rw-r--r--cgitrc.5.txt6
-rw-r--r--ui-commit.c8
4 files changed, 17 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index eb7b45d..2cda554 100644
--- a/cgit.c
+++ b/cgit.c
@@ -92,2 +92,4 @@ void config_cb(const char *name, const char *value)
92 ctx.cfg.cache_dynamic_ttl = atoi(value); 92 ctx.cfg.cache_dynamic_ttl = atoi(value);
93 else if (!strcmp(name, "commit-filter"))
94 ctx.cfg.commit_filter = new_filter(value, 0);
93 else if (!strcmp(name, "embedded")) 95 else if (!strcmp(name, "embedded"))
diff --git a/cgit.h b/cgit.h
index f9cf0df..438301d 100644
--- a/cgit.h
+++ b/cgit.h
@@ -185,2 +185,3 @@ struct cgit_config {
185 int summary_tags; 185 int summary_tags;
186 struct cgit_filter *commit_filter;
186 struct cgit_filter *source_filter; 187 struct cgit_filter *source_filter;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index d420ad4..2efd6aa 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -57,2 +57,8 @@ clone-prefix::
57 57
58commit-filter::
59 Specifies a command which will be invoked to format commit messages.
60 The command will get the message on its STDIN, and the STDOUT from the
61 command will be included verbatim as the commit message, i.e. this can
62 be used to implement bugtracker integration. Default value: none.
63
58css:: 64css::
diff --git a/ui-commit.c b/ui-commit.c
index 41ce70e..ee0e139 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -91,3 +91,7 @@ void cgit_print_commit(char *hex)
91 html("<div class='commit-subject'>"); 91 html("<div class='commit-subject'>");
92 if (ctx.cfg.commit_filter)
93 cgit_open_filter(ctx.cfg.commit_filter);
92 html_txt(info->subject); 94 html_txt(info->subject);
95 if (ctx.cfg.commit_filter)
96 cgit_close_filter(ctx.cfg.commit_filter);
93 show_commit_decorations(commit); 97 show_commit_decorations(commit);
@@ -95,3 +99,7 @@ void cgit_print_commit(char *hex)
95 html("<div class='commit-msg'>"); 99 html("<div class='commit-msg'>");
100 if (ctx.cfg.commit_filter)
101 cgit_open_filter(ctx.cfg.commit_filter);
96 html_txt(info->msg); 102 html_txt(info->msg);
103 if (ctx.cfg.commit_filter)
104 cgit_close_filter(ctx.cfg.commit_filter);
97 html("</div>"); 105 html("</div>");