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 65b210f..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 | ||
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", |
@@ -318,7 +324,7 @@ source-filter:: | |||
318 | 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 |
319 | 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. |
320 | 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: |
321 | none. | 327 | none. See also: "FILTER API". |
322 | 328 | ||
323 | summary-branches:: | 329 | summary-branches:: |
324 | Specifies the number of branches to display in the repository "summary" | 330 | Specifies the number of branches to display in the repository "summary" |
@@ -351,7 +357,7 @@ REPOSITORY SETTINGS | |||
351 | ------------------- | 357 | ------------------- |
352 | repo.about-filter:: | 358 | repo.about-filter:: |
353 | Override the default about-filter. Default value: none. See also: | 359 | Override the default about-filter. Default value: none. See also: |
354 | "enable-filter-overrides". | 360 | "enable-filter-overrides". See also: "FILTER API". |
355 | 361 | ||
356 | repo.clone-url:: | 362 | repo.clone-url:: |
357 | 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. |
@@ -359,7 +365,7 @@ repo.clone-url:: | |||
359 | 365 | ||
360 | repo.commit-filter:: | 366 | repo.commit-filter:: |
361 | Override the default commit-filter. Default value: none. See also: | 367 | Override the default commit-filter. Default value: none. See also: |
362 | "enable-filter-overrides". | 368 | "enable-filter-overrides". See also: "FILTER API". |
363 | 369 | ||
364 | repo.defbranch:: | 370 | repo.defbranch:: |
365 | 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 |
@@ -430,7 +436,7 @@ repo.section:: | |||
430 | 436 | ||
431 | repo.source-filter:: | 437 | repo.source-filter:: |
432 | Override the default source-filter. Default value: none. See also: | 438 | Override the default source-filter. Default value: none. See also: |
433 | "enable-filter-overrides". | 439 | "enable-filter-overrides". See also: "FILTER API". |
434 | 440 | ||
435 | repo.url:: | 441 | repo.url:: |
436 | 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 |
@@ -450,6 +456,42 @@ Note: the "repo." prefix is dropped from the option names in repo-specific | |||
450 | config files, e.g. "repo.desc" becomes "desc". | 456 | config files, e.g. "repo.desc" becomes "desc". |
451 | 457 | ||
452 | 458 | ||
459 | FILTER 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 | |||
476 | Also, 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 | |||
485 | If a setting is not defined for a repository and the corresponding global | ||
486 | setting is also not defined (if applicable), then the corresponding | ||
487 | environment variable will be an empty string. | ||
488 | |||
489 | Note that under normal circumstance all these environment variables are | ||
490 | defined. If however the total size of the defined settings exceed the | ||
491 | allocated buffer within cgit then only the environment variables that fit | ||
492 | in the allocated buffer are handed to the filter. | ||
493 | |||
494 | |||
453 | EXAMPLE CGITRC FILE | 495 | EXAMPLE CGITRC FILE |
454 | ------------------- | 496 | ------------------- |
455 | 497 | ||