diff options
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r-- | cgitrc.5.txt | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 10b86f3..8e31578 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 | ||
36 | agefile:: | 36 | agefile:: |
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 | ||
85 | css:: | 86 | css:: |
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. |
@@ -105,6 +106,11 @@ enable-gitweb-owner:: | |||
105 | for the git config value "gitweb.owner" to determine the owner. | 106 | for the git config value "gitweb.owner" to determine the owner. |
106 | Default value: "1". See also: scan-path. | 107 | Default value: "1". See also: scan-path. |
107 | 108 | ||
109 | enable-http-clone:: | ||
110 | If set to "1", cgit will act as an dumb HTTP endpoint for git clones. | ||
111 | If you use an alternate way of serving git repositories, you may wish | ||
112 | to disable this. Default value: "1". | ||
113 | |||
108 | enable-index-links:: | 114 | enable-index-links:: |
109 | Flag which, when set to "1", will make cgit generate extra links for | 115 | Flag which, when set to "1", will make cgit generate extra links for |
110 | each repo in the repository index (specifically, to the "summary", | 116 | each repo in the repository index (specifically, to the "summary", |
@@ -320,7 +326,7 @@ source-filter:: | |||
320 | and the name of the blob as its only command line argument. The STDOUT | 326 | and the name of the blob as its only command line argument. The STDOUT |
321 | from the command will be included verbatim as the blob contents, i.e. | 327 | from the command will be included verbatim as the blob contents, i.e. |
322 | this can be used to implement e.g. syntax highlighting. Default value: | 328 | this can be used to implement e.g. syntax highlighting. Default value: |
323 | none. | 329 | none. See also: "FILTER API". |
324 | 330 | ||
325 | summary-branches:: | 331 | summary-branches:: |
326 | Specifies the number of branches to display in the repository "summary" | 332 | Specifies the number of branches to display in the repository "summary" |
@@ -353,7 +359,7 @@ REPOSITORY SETTINGS | |||
353 | ------------------- | 359 | ------------------- |
354 | repo.about-filter:: | 360 | repo.about-filter:: |
355 | Override the default about-filter. Default value: none. See also: | 361 | Override the default about-filter. Default value: none. See also: |
356 | "enable-filter-overrides". | 362 | "enable-filter-overrides". See also: "FILTER API". |
357 | 363 | ||
358 | repo.clone-url:: | 364 | repo.clone-url:: |
359 | A list of space-separated urls which can be used to clone this repo. | 365 | A list of space-separated urls which can be used to clone this repo. |
@@ -361,7 +367,7 @@ repo.clone-url:: | |||
361 | 367 | ||
362 | repo.commit-filter:: | 368 | repo.commit-filter:: |
363 | Override the default commit-filter. Default value: none. See also: | 369 | Override the default commit-filter. Default value: none. See also: |
364 | "enable-filter-overrides". | 370 | "enable-filter-overrides". See also: "FILTER API". |
365 | 371 | ||
366 | repo.defbranch:: | 372 | repo.defbranch:: |
367 | The name of the default branch for this repository. If no such branch | 373 | The name of the default branch for this repository. If no such branch |
@@ -432,7 +438,7 @@ repo.section:: | |||
432 | 438 | ||
433 | repo.source-filter:: | 439 | repo.source-filter:: |
434 | Override the default source-filter. Default value: none. See also: | 440 | Override the default source-filter. Default value: none. See also: |
435 | "enable-filter-overrides". | 441 | "enable-filter-overrides". See also: "FILTER API". |
436 | 442 | ||
437 | repo.url:: | 443 | repo.url:: |
438 | The relative url used to access the repository. This must be the first | 444 | The relative url used to access the repository. This must be the first |
@@ -452,6 +458,42 @@ Note: the "repo." prefix is dropped from the option names in repo-specific | |||
452 | config files, e.g. "repo.desc" becomes "desc". | 458 | config files, e.g. "repo.desc" becomes "desc". |
453 | 459 | ||
454 | 460 | ||
461 | FILTER API | ||
462 | ---------- | ||
463 | - about filter:: | ||
464 | This filter is given no arguments. | ||
465 | The about text that is to be filtered is available on standard input and the | ||
466 | filtered text is expected on standard output. | ||
467 | - commit filter:: | ||
468 | This filter is given no arguments. | ||
469 | The commit message text that is to be filtered is available on standard input | ||
470 | and the filtered text is expected on standard output. | ||
471 | - source filter:: | ||
472 | This filter is given a single parameter: the filename of the source file to | ||
473 | filter. The filter can use the filename to determine (for example) the syntax | ||
474 | highlighting mode. | ||
475 | The contents of the source file that is to be filtered is available on | ||
476 | standard input and the filtered contents is expected on standard output. | ||
477 | |||
478 | Also, all filters are handed the following environment variables: | ||
479 | - CGIT_REPO_URL ( = repo.url setting ) | ||
480 | - CGIT_REPO_NAME ( = repo.name setting ) | ||
481 | - CGIT_REPO_PATH ( = repo.path setting ) | ||
482 | - CGIT_REPO_OWNER ( = repo.owner setting ) | ||
483 | - CGIT_REPO_DEFBRANCH ( = repo.defbranch setting ) | ||
484 | - CGIT_REPO_SECTION ( = section setting ) | ||
485 | - CGIT_REPO_CLONE_URL ( = repo.clone-url setting ) | ||
486 | |||
487 | If a setting is not defined for a repository and the corresponding global | ||
488 | setting is also not defined (if applicable), then the corresponding | ||
489 | environment variable will be an empty string. | ||
490 | |||
491 | Note that under normal circumstance all these environment variables are | ||
492 | defined. If however the total size of the defined settings exceed the | ||
493 | allocated buffer within cgit then only the environment variables that fit | ||
494 | in the allocated buffer are handed to the filter. | ||
495 | |||
496 | |||
455 | MACRO EXPANSION | 497 | MACRO EXPANSION |
456 | --------------- | 498 | --------------- |
457 | The following cgitrc options supports a simple macro expansion feature, | 499 | The following cgitrc options supports a simple macro expansion feature, |