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 --- cgitrc.5.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index a207fe0..d420ad4 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -198,6 +198,14 @@ snapshots:: "zip" zip-file Default value: none. +source-filter:: + Specifies a command which will be invoked to format plaintext blobs + in the tree view. The command will get the blob content on its STDIN + and the name of the blob as its only command line argument. The STDOUT + from the command will be included verbatim as the blob contents, i.e. + this can be used to implement e.g. syntax highlighting. Default value: + none. + summary-branches:: Specifies the number of branches to display in the repository "summary" view. Default value: "10". -- cgit v1.2.1 From f35db1cd2b75aac6952aa07713e44ca01fd89727 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Fri, 31 Jul 2009 17:42:57 +0200 Subject: ui-commit: add support for 'commit-filter' option This new option specifies a filter which is executed on the commit message, i.e. the commit message is written to the filters STDIN and the filters STDOUT is included verbatim as the commit message. This can be used to implement commit linking by creating a simple shell script in e.g. /usr/bin/cgit-commit-filter.sh like this: #/bin/sh sed -re 's|\b([0-9a-fA-F]{6,40})\b|\1|g' Signed-off-by: Lars Hjemli --- cgitrc.5.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index d420ad4..2efd6aa 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -55,6 +55,12 @@ clone-prefix:: setting is only used if `repo.clone-url` is unspecified. Default value: none. +commit-filter:: + Specifies a command which will be invoked to format commit messages. + The command will get the message on its STDIN, and the STDOUT from the + command will be included verbatim as the commit message, i.e. this can + be used to implement bugtracker integration. Default value: none. + css:: Url which specifies the css document to include in all cgit pages. Default value: "/cgit.css". -- cgit v1.2.1 From e976df27952ca1e450c1c3d420532ac9f5e3036b Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 9 Aug 2009 13:22:00 +0200 Subject: 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 --- cgitrc.5.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 2efd6aa..ffb3e0f 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -238,6 +238,9 @@ repo.clone-url:: A list of space-separated urls which can be used to clone this repo. Default value: none. +repo.commit-filter:: + Override the default commit-filter. Default value: . + repo.defbranch:: The name of the default branch for this repository. If no such branch exists in the repository, the first branch name (when sorted) is used @@ -278,6 +281,9 @@ repo.snapshots:: A mask of allowed snapshot-formats for this repo, restricted by the "snapshots" global setting. Default value: . +repo.source-filter:: + Override the default source-filter. Default value: . + repo.url:: The relative url used to access the repository. This must be the first setting specified for each repo. Default value: none. -- cgit v1.2.1