aboutsummaryrefslogtreecommitdiffstats
path: root/cgitrc.5.txt
diff options
context:
space:
mode:
authorGravatar Lars Hjemli <hjemli@gmail.com>2011-05-24 06:28:38 (JST)
committerGravatar Lars Hjemli <hjemli@gmail.com>2011-05-24 06:28:38 (JST)
commitab350a77b1d3b0e251cc28329f2e16f0566e521e (patch)
tree1af2b0760858fcd87ce1e628465f9b60af7815e3 /cgitrc.5.txt
parent652a5a18db3b0409fedfaf8c5720446d87628ba0 (diff)
parentc2b58ed8539fcfa4f05cc9da316bbc782f4b8f10 (diff)
downloadcgit-ab350a77b1d3b0e251cc28329f2e16f0566e521e.zip
cgit-ab350a77b1d3b0e251cc28329f2e16f0566e521e.tar.gz
Merge branch 'fh/filter-api'
Conflicts: cgit.c
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt47
1 files changed, 42 insertions, 5 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 875d51f..5903a93 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -31,7 +31,7 @@ about-filter::
31 about pages (both top-level and for each repository). The command will 31 about pages (both top-level and for each repository). The command will
32 get the content of the about-file on its STDIN, and the STDOUT from the 32 get the content of the about-file on its STDIN, and the STDOUT from the
33 command will be included verbatim on the about page. Default value: 33 command will be included verbatim on the about page. Default value:
34 none. 34 none. See also: "FILTER API".
35 35
36agefile:: 36agefile::
37 Specifies a path, relative to each repository path, which can be used 37 Specifies a path, relative to each repository path, which can be used
@@ -81,6 +81,7 @@ commit-filter::
81 The command will get the message on its STDIN, and the STDOUT from the 81 The command will get the message on its STDIN, and the STDOUT from the
82 command will be included verbatim as the commit message, i.e. this can 82 command will be included verbatim as the commit message, i.e. this can
83 be used to implement bugtracker integration. Default value: none. 83 be used to implement bugtracker integration. Default value: none.
84 See also: "FILTER API".
84 85
85css:: 86css::
86 Url which specifies the css document to include in all cgit pages. 87 Url which specifies the css document to include in all cgit pages.
@@ -323,7 +324,7 @@ source-filter::
323 and the name of the blob as its only command line argument. The STDOUT 324 and the name of the blob as its only command line argument. The STDOUT
324 from the command will be included verbatim as the blob contents, i.e. 325 from the command will be included verbatim as the blob contents, i.e.
325 this can be used to implement e.g. syntax highlighting. Default value: 326 this can be used to implement e.g. syntax highlighting. Default value:
326 none. 327 none. See also: "FILTER API".
327 328
328summary-branches:: 329summary-branches::
329 Specifies the number of branches to display in the repository "summary" 330 Specifies the number of branches to display in the repository "summary"
@@ -356,7 +357,7 @@ REPOSITORY SETTINGS
356------------------- 357-------------------
357repo.about-filter:: 358repo.about-filter::
358 Override the default about-filter. Default value: none. See also: 359 Override the default about-filter. Default value: none. See also:
359 "enable-filter-overrides". 360 "enable-filter-overrides". See also: "FILTER API".
360 361
361repo.clone-url:: 362repo.clone-url::
362 A list of space-separated urls which can be used to clone this repo. 363 A list of space-separated urls which can be used to clone this repo.
@@ -364,7 +365,7 @@ repo.clone-url::
364 365
365repo.commit-filter:: 366repo.commit-filter::
366 Override the default commit-filter. Default value: none. See also: 367 Override the default commit-filter. Default value: none. See also:
367 "enable-filter-overrides". 368 "enable-filter-overrides". See also: "FILTER API".
368 369
369repo.defbranch:: 370repo.defbranch::
370 The name of the default branch for this repository. If no such branch 371 The name of the default branch for this repository. If no such branch
@@ -435,7 +436,7 @@ repo.section::
435 436
436repo.source-filter:: 437repo.source-filter::
437 Override the default source-filter. Default value: none. See also: 438 Override the default source-filter. Default value: none. See also:
438 "enable-filter-overrides". 439 "enable-filter-overrides". See also: "FILTER API".
439 440
440repo.url:: 441repo.url::
441 The relative url used to access the repository. This must be the first 442 The relative url used to access the repository. This must be the first
@@ -455,6 +456,42 @@ Note: the "repo." prefix is dropped from the option names in repo-specific
455config files, e.g. "repo.desc" becomes "desc". 456config files, e.g. "repo.desc" becomes "desc".
456 457
457 458
459FILTER API
460----------
461- about filter::
462 This filter is given no arguments.
463 The about text that is to be filtered is available on standard input and the
464 filtered text is expected on standard output.
465- commit filter::
466 This filter is given no arguments.
467 The commit message text that is to be filtered is available on standard input
468 and the filtered text is expected on standard output.
469- source filter::
470 This filter is given a single parameter: the filename of the source file to
471 filter. The filter can use the filename to determine (for example) the syntax
472 highlighting mode.
473 The contents of the source file that is to be filtered is available on
474 standard input and the filtered contents is expected on standard output.
475
476Also, all filters are handed the following environment variables:
477- CGIT_REPO_URL ( = repo.url setting )
478- CGIT_REPO_NAME ( = repo.name setting )
479- CGIT_REPO_PATH ( = repo.path setting )
480- CGIT_REPO_OWNER ( = repo.owner setting )
481- CGIT_REPO_DEFBRANCH ( = repo.defbranch setting )
482- CGIT_REPO_SECTION ( = section setting )
483- CGIT_REPO_CLONE_URL ( = repo.clone-url setting )
484
485If a setting is not defined for a repository and the corresponding global
486setting is also not defined (if applicable), then the corresponding
487environment variable will be an empty string.
488
489Note that under normal circumstance all these environment variables are
490defined. If however the total size of the defined settings exceed the
491allocated buffer within cgit then only the environment variables that fit
492in the allocated buffer are handed to the filter.
493
494
458EXAMPLE CGITRC FILE 495EXAMPLE CGITRC FILE
459------------------- 496-------------------
460 497