blob: 9d0c08997298ea6c5e8583c6c874fe7ef004ea69 [file] [log] [blame]
Loui Chang676d17b2009-09-14 01:21:10 -04001:man source: cgit
2:man manual: cgit
3
Matt McCormick (thewtex)9f9ede32009-02-11 23:06:05 -06004CGITRC(5)
5========
Lars Hjemlidf461232008-10-05 18:55:49 +02006
7
8NAME
9----
Lars Hjemlic54f8a52009-02-12 10:12:05 +010010cgitrc - runtime configuration for cgit
Lars Hjemlidf461232008-10-05 18:55:49 +020011
12
Matt McCormick (thewtex)9f9ede32009-02-11 23:06:05 -060013SYNOPSIS
14--------
Lars Hjemlidf461232008-10-05 18:55:49 +020015Cgitrc contains all runtime settings for cgit, including the list of git
16repositories, formatted as a line-separated list of NAME=VALUE pairs. Blank
17lines, and lines starting with '#', are ignored.
18
19
Lars Hjemlifcc60562009-08-10 18:58:29 +020020LOCATION
21--------
22The default location of cgitrc, defined at compile time, is /etc/cgitrc. At
23runtime, cgit will consult the environment variable CGIT_CONFIG and, if
24defined, use its value instead.
25
26
Lars Hjemlidf461232008-10-05 18:55:49 +020027GLOBAL SETTINGS
28---------------
Lars Hjemli537c05f2009-08-09 13:27:21 +020029about-filter::
30 Specifies a command which will be invoked to format the content of
31 about pages (both top-level and for each repository). The command will
Jason A. Donenfeld2a1ead32013-05-25 20:30:57 +020032 get the content of the about-file on its STDIN, the name of the file
33 as the first argument, and the STDOUT from the command will be
34 included verbatim on the about page. Default value: none. See
35 also: "FILTER API".
Lars Hjemli537c05f2009-08-09 13:27:21 +020036
Lars Hjemlid3b29332009-02-12 09:58:28 +010037agefile::
Lars Hjemlidf461232008-10-05 18:55:49 +020038 Specifies a path, relative to each repository path, which can be used
39 to specify the date and time of the youngest commit in the repository.
40 The first line in the file is used as input to the "parse_date"
41 function in libgit. Recommended timestamp-format is "yyyy-mm-dd
42 hh:mm:ss". Default value: "info/web/last-modified".
43
Jason A. Donenfeld389cc172013-04-08 16:57:12 +020044branch-sort::
45 Flag which, when set to "age", enables date ordering in the branch ref
46 list, and when set to "name" enables ordering by branch name. Default
47 value: "name".
48
Lars Hjemlid3b29332009-02-12 09:58:28 +010049cache-root::
Lars Hjemlidf461232008-10-05 18:55:49 +020050 Path used to store the cgit cache entries. Default value:
Lars Hjemlief13e5e2011-06-13 21:58:39 +000051 "/var/cache/cgit". See also: "MACRO EXPANSION".
Lars Hjemlidf461232008-10-05 18:55:49 +020052
Jason A. Donenfeld61ff1002013-05-28 16:33:30 +020053cache-static-ttl::
54 Number which specifies the time-to-live, in minutes, for the cached
55 version of repository pages accessed with a fixed SHA1. Negative
56 values have infinite ttl. Default value: -1".
57
Lars Hjemlid3b29332009-02-12 09:58:28 +010058cache-dynamic-ttl::
Lars Hjemlidf461232008-10-05 18:55:49 +020059 Number which specifies the time-to-live, in minutes, for the cached
Jason A. Donenfeld61ff1002013-05-28 16:33:30 +020060 version of repository pages accessed without a fixed SHA1. Negative
61 values have infinite ttl. Default value: "5".
Lars Hjemlidf461232008-10-05 18:55:49 +020062
Lars Hjemlid3b29332009-02-12 09:58:28 +010063cache-repo-ttl::
Lars Hjemlidf461232008-10-05 18:55:49 +020064 Number which specifies the time-to-live, in minutes, for the cached
Jason A. Donenfeld61ff1002013-05-28 16:33:30 +020065 version of the repository summary page. Negative values have infinite
66 ttl. Default value: "5".
Lars Hjemlidf461232008-10-05 18:55:49 +020067
Lars Hjemlid3b29332009-02-12 09:58:28 +010068cache-root-ttl::
Lars Hjemlidf461232008-10-05 18:55:49 +020069 Number which specifies the time-to-live, in minutes, for the cached
Jason A. Donenfeld61ff1002013-05-28 16:33:30 +020070 version of the repository index page. Negative values have infinite
71 ttl. Default value: "5".
Lars Hjemlidf461232008-10-05 18:55:49 +020072
Lars Hjemlib4dc93d2009-08-20 17:42:14 +020073cache-scanrc-ttl::
74 Number which specifies the time-to-live, in minutes, for the result
Jason A. Donenfeld61ff1002013-05-28 16:33:30 +020075 of scanning a path for git repositories. Negative values have infinite
76 ttl. Default value: "15".
77
78cache-about-ttl::
79 Number which specifies the time-to-live, in minutes, for the cached
80 version of the repository about page. Negative values have infinite
81 ttl. Default value: "15".
Lars Hjemlib4dc93d2009-08-20 17:42:14 +020082
Lars Hjemlid3b29332009-02-12 09:58:28 +010083cache-size::
Lars Hjemlidf461232008-10-05 18:55:49 +020084 The maximum number of entries in the cgit cache. Default value: "0"
85 (i.e. caching is disabled).
86
Jason A. Donenfeld184c5652012-07-12 19:13:39 +020087case-sensitive-sort::
88 Sort items in the repo list case sensitively. Default value: "1".
Tobias Bieniek7a4e7c82012-10-09 20:53:29 +020089 See also: repository-sort, section-sort.
Jason A. Donenfeld184c5652012-07-12 19:13:39 +020090
Lars Hjemlid3b29332009-02-12 09:58:28 +010091clone-prefix::
Lars Hjemlidf461232008-10-05 18:55:49 +020092 Space-separated list of common prefixes which, when combined with a
93 repository url, generates valid clone urls for the repository. This
94 setting is only used if `repo.clone-url` is unspecified. Default value:
95 none.
96
Lars Hjemlia1429db2011-06-06 20:49:13 +000097clone-url::
98 Space-separated list of clone-url templates. This setting is only
99 used if `repo.clone-url` is unspecified. Default value: none. See
100 also: "MACRO EXPANSION", "FILTER API".
101
Lars Hjemlif35db1c2009-07-31 17:42:57 +0200102commit-filter::
103 Specifies a command which will be invoked to format commit messages.
104 The command will get the message on its STDIN, and the STDOUT from the
105 command will be included verbatim as the commit message, i.e. this can
106 be used to implement bugtracker integration. Default value: none.
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100107 See also: "FILTER API".
Lars Hjemlif35db1c2009-07-31 17:42:57 +0200108
Jason A. Donenfeld389cc172013-04-08 16:57:12 +0200109commit-sort::
110 Flag which, when set to "date", enables strict date ordering in the
111 commit log, and when set to "topo" enables strict topological
112 ordering. If unset, the default ordering of "git log" is used. Default
113 value: unset.
114
Lars Hjemlid3b29332009-02-12 09:58:28 +0100115css::
Lars Hjemlidf461232008-10-05 18:55:49 +0200116 Url which specifies the css document to include in all cgit pages.
117 Default value: "/cgit.css".
118
Lars Hjemli286a9052009-07-25 12:29:22 +0200119embedded::
Lars Hjemli86b753c2009-07-25 12:23:30 +0200120 Flag which, when set to "1", will make cgit generate a html fragment
121 suitable for embedding in other html pages. Default value: none. See
122 also: "noheader".
Johan Herland9a8d39c2010-11-15 18:39:50 +0100123
124enable-commit-graph::
125 Flag which, when set to "1", will make cgit print an ASCII-art commit
126 history graph to the left of the commit messages in the repository
127 log page. Default value: "0".
128
Lars Hjemli2273c2c2009-08-24 08:53:21 +0200129enable-filter-overrides::
130 Flag which, when set to "1", allows all filter settings to be
131 overridden in repository-specific cgitrc files. Default value: none.
132
Dan McGee42231322011-01-12 12:06:07 -0600133enable-http-clone::
134 If set to "1", cgit will act as an dumb HTTP endpoint for git clones.
135 If you use an alternate way of serving git repositories, you may wish
136 to disable this. Default value: "1".
137
Lars Hjemlid3b29332009-02-12 09:58:28 +0100138enable-index-links::
Lars Hjemlidf461232008-10-05 18:55:49 +0200139 Flag which, when set to "1", will make cgit generate extra links for
140 each repo in the repository index (specifically, to the "summary",
141 "commit" and "tree" pages). Default value: "0".
142
Florian Pritzb1e172a2013-02-01 10:59:13 +0100143enable-index-owner::
144 Flag which, when set to "1", will make cgit display the owner of
145 each repo in the repository index. Default value: "1".
146
Lars Hjemlid3b29332009-02-12 09:58:28 +0100147enable-log-filecount::
Lars Hjemlidf461232008-10-05 18:55:49 +0200148 Flag which, when set to "1", will make cgit print the number of
149 modified files for each commit on the repository log page. Default
150 value: "0".
151
Lars Hjemlid3b29332009-02-12 09:58:28 +0100152enable-log-linecount::
Lars Hjemlidf461232008-10-05 18:55:49 +0200153 Flag which, when set to "1", will make cgit print the number of added
154 and removed lines for each commit on the repository log page. Default
155 value: "0".
156
Lars Hjemli41934a32009-11-07 19:10:58 +0100157enable-remote-branches::
158 Flag which, when set to "1", will make cgit display remote branches
159 in the summary and refs views. Default value: "0". See also:
160 "repo.enable-remote-branches".
161
Lars Hjemli581a0c22010-02-27 13:12:55 +0100162enable-subject-links::
163 Flag which, when set to "1", will make cgit use the subject of the
164 parent commit as link text when generating links to parent commits
165 in commit view. Default value: "0". See also:
166 "repo.enable-subject-links".
167
Lars Hjemlib0f946b2009-08-21 14:26:52 +0200168enable-tree-linenumbers::
169 Flag which, when set to "1", will make cgit generate linenumber links
170 for plaintext blobs printed in the tree view. Default value: "1".
171
Jason A. Donenfeld521e10c2012-10-09 06:56:14 -0400172enable-git-config::
173 Flag which, when set to "1", will allow cgit to use git config to set
174 any repo specific settings. This option is used in conjunction with
Jason A. Donenfelda8d613e2013-04-10 14:42:49 +0200175 "scan-path", and must be defined prior, to augment repo-specific
176 settings. The keys gitweb.owner, gitweb.category, and gitweb.description
177 will map to the cgit keys repo.owner, repo.section, and repo.desc,
178 respectivly. All git config keys that begin with "cgit." will be mapped
179 to the corresponding "repo." key in cgit. Default value: "0". See also:
180 scan-path, section-from-path.
Jason A. Donenfeld521e10c2012-10-09 06:56:14 -0400181
Lars Hjemlid3b29332009-02-12 09:58:28 +0100182favicon::
Christian Hesse830eb6f2013-07-22 08:56:50 +0200183 Url used as link to a shortcut icon for cgit. It is suggested to use
184 the value "/favicon.ico" since certain browsers will ignore other
185 values. Default value: "/favicon.ico".
Lars Hjemlidf461232008-10-05 18:55:49 +0200186
Lars Hjemlid3b29332009-02-12 09:58:28 +0100187footer::
Lars Hjemlidf461232008-10-05 18:55:49 +0200188 The content of the file specified with this option will be included
189 verbatim at the bottom of all pages (i.e. it replaces the standard
190 "generated by..." message. Default value: none.
191
Lars Hjemlif618e8f2009-07-25 12:03:54 +0200192head-include::
193 The content of the file specified with this option will be included
194 verbatim in the html HEAD section on all pages. Default value: none.
195
Lars Hjemlid3b29332009-02-12 09:58:28 +0100196header::
Lars Hjemlib1159552009-01-29 21:27:39 +0100197 The content of the file specified with this option will be included
198 verbatim at the top of all pages. Default value: none.
199
Lars Hjemlid3b29332009-02-12 09:58:28 +0100200include::
Lars Hjemlidf461232008-10-05 18:55:49 +0200201 Name of a configfile to include before the rest of the current config-
Lars Hjemlief13e5e2011-06-13 21:58:39 +0000202 file is parsed. Default value: none. See also: "MACRO EXPANSION".
Lars Hjemlidf461232008-10-05 18:55:49 +0200203
Lars Hjemlid3b29332009-02-12 09:58:28 +0100204index-header::
Lars Hjemlidf461232008-10-05 18:55:49 +0200205 The content of the file specified with this option will be included
206 verbatim above the repository index. This setting is deprecated, and
207 will not be supported by cgit-1.0 (use root-readme instead). Default
208 value: none.
209
Lars Hjemlid3b29332009-02-12 09:58:28 +0100210index-info::
Lars Hjemlidf461232008-10-05 18:55:49 +0200211 The content of the file specified with this option will be included
212 verbatim below the heading on the repository index page. This setting
213 is deprecated, and will not be supported by cgit-1.0 (use root-desc
214 instead). Default value: none.
215
Lars Hjemlid3b29332009-02-12 09:58:28 +0100216local-time::
Lars Hjemlidf461232008-10-05 18:55:49 +0200217 Flag which, if set to "1", makes cgit print commit and tag times in the
218 servers timezone. Default value: "0".
219
Lars Hjemlid3b29332009-02-12 09:58:28 +0100220logo::
Lars Hjemlidf461232008-10-05 18:55:49 +0200221 Url which specifies the source of an image which will be used as a logo
Lars Hjemli92f9b532009-08-10 18:14:12 +0200222 on all cgit pages. Default value: "/cgit.png".
Lars Hjemlidf461232008-10-05 18:55:49 +0200223
Lars Hjemlid3b29332009-02-12 09:58:28 +0100224logo-link::
Lars Hjemlidf461232008-10-05 18:55:49 +0200225 Url loaded when clicking on the cgit logo image. If unspecified the
226 calculated url of the repository index page will be used. Default
227 value: none.
228
Aaron Griffin80476b02010-02-04 18:08:16 -0600229max-atom-items::
230 Specifies the number of items to display in atom feeds view. Default
231 value: "10".
232
Lars Hjemlid3b29332009-02-12 09:58:28 +0100233max-commit-count::
Lars Hjemlidf461232008-10-05 18:55:49 +0200234 Specifies the number of entries to list per page in "log" view. Default
235 value: "50".
236
Lars Hjemlid3b29332009-02-12 09:58:28 +0100237max-message-length::
Lars Hjemlidf461232008-10-05 18:55:49 +0200238 Specifies the maximum number of commit message characters to display in
239 "log" view. Default value: "80".
240
Lars Hjemlid3b29332009-02-12 09:58:28 +0100241max-repo-count::
Lars Hjemlidf461232008-10-05 18:55:49 +0200242 Specifies the number of entries to list per page on the repository
243 index page. Default value: "50".
244
Lars Hjemlid3b29332009-02-12 09:58:28 +0100245max-repodesc-length::
Lars Hjemlidf461232008-10-05 18:55:49 +0200246 Specifies the maximum number of repo description characters to display
247 on the repository index page. Default value: "80".
248
Georg Lukasef07ccc2009-11-28 03:44:33 +0100249max-blob-size::
250 Specifies the maximum size of a blob to display HTML for in KBytes.
251 Default value: "0" (limit disabled).
252
Lars Hjemlid3b29332009-02-12 09:58:28 +0100253max-stats::
Lars Hjemlifb2f3f62008-12-07 13:17:21 +0100254 Set the default maximum statistics period. Valid values are "week",
255 "month", "quarter" and "year". If unspecified, statistics are
256 disabled. Default value: none. See also: "repo.max-stats".
257
Lars Hjemlic4d46c72009-02-13 20:43:30 +0100258mimetype.<ext>::
259 Set the mimetype for the specified filename extension. This is used
260 by the `plain` command when returning blob content.
261
Ferry Hubertsd01c6002011-07-19 10:51:58 +0200262mimetype-file::
263 Specifies the file to use for automatic mimetype lookup. If specified
264 then this field is used as a fallback when no "mimetype.<ext>" match is
265 found. If unspecified then no such lookup is performed. The typical file
Jason A. Donenfeldc6f5bc72012-11-15 17:21:47 +0100266 to use on a Linux system is /etc/mime.types. The format of the file must
267 comply to:
Ferry Hubertsd01c6002011-07-19 10:51:58 +0200268 - a comment line is an empty line or a line starting with a hash (#),
269 optionally preceded by whitespace
270 - a non-comment line starts with the mimetype (like image/png), followed
271 by one or more file extensions (like jpg), all separated by whitespace
Jason A. Donenfeldab9805a2012-11-15 01:26:06 +0100272 Default value: none. See also: "mimetype.<ext>".
Ferry Hubertsd01c6002011-07-19 10:51:58 +0200273
Lars Hjemlid3b29332009-02-12 09:58:28 +0100274module-link::
Lars Hjemlidf461232008-10-05 18:55:49 +0200275 Text which will be used as the formatstring for a hyperlink when a
276 submodule is printed in a directory listing. The arguments for the
277 formatstring are the path and SHA1 of the submodule commit. Default
Lars Hjemli3fbaf092011-06-15 10:13:15 +0200278 value: none.
Lars Hjemlidf461232008-10-05 18:55:49 +0200279
Lars Hjemlid3b29332009-02-12 09:58:28 +0100280nocache::
Lars Hjemlidf461232008-10-05 18:55:49 +0200281 If set to the value "1" caching will be disabled. This settings is
282 deprecated, and will not be honored starting with cgit-1.0. Default
283 value: "0".
284
Martin Szulecki2f56e392009-08-07 14:05:17 +0200285noplainemail::
286 If set to "1" showing full author email adresses will be disabled.
287 Default value: "0".
288
Lars Hjemli286a9052009-07-25 12:29:22 +0200289noheader::
Lars Hjemli86b753c2009-07-25 12:23:30 +0200290 Flag which, when set to "1", will make cgit omit the standard header
291 on all pages. Default value: none. See also: "embedded".
292
Jason A. Donenfeld35165022010-07-29 17:52:29 +0200293project-list::
294 A list of subdirectories inside of scan-path, relative to it, that
295 should loaded as git repositories. This must be defined prior to
Lars Hjemlief13e5e2011-06-13 21:58:39 +0000296 scan-path. Default value: none. See also: scan-path, "MACRO
297 EXPANSION".
Jason A. Donenfeld35165022010-07-29 17:52:29 +0200298
Lars Hjemli515edb02010-08-21 15:08:01 +0200299readme::
Jason A. Donenfeld2a1ead32013-05-25 20:30:57 +0200300 Text which will be used as default value for "repo.readme". Multiple
Jason A. Donenfelddcbc0432013-05-26 15:20:02 +0200301 config keys may be specified, and cgit will use the first found file
302 in this list. This is useful in conjunction with scan-path. Default
303 value: none. See also: scan-path, repo.readme.
Lars Hjemli515edb02010-08-21 15:08:01 +0200304
Jason A. Donenfeld2e4a9412010-07-29 19:47:50 +0200305remove-suffix::
306 If set to "1" and scan-path is enabled, if any repositories are found
307 with a suffix of ".git", this suffix will be removed for the url and
Jason A. Donenfelda8d613e2013-04-10 14:42:49 +0200308 name. This must be defined prior to scan-path. Default value: "0".
309 See also: scan-path.
Jason A. Donenfeld2e4a9412010-07-29 19:47:50 +0200310
Lars Hjemlid3b29332009-02-12 09:58:28 +0100311renamelimit::
Lars Hjemlidf461232008-10-05 18:55:49 +0200312 Maximum number of files to consider when detecting renames. The value
313 "-1" uses the compiletime value in git (for further info, look at
314 `man git-diff`). Default value: "-1".
315
Lars Hjemlid3b29332009-02-12 09:58:28 +0100316repo.group::
Lars Hjemli007df982009-08-24 07:51:48 +0200317 Legacy alias for "section". This option is deprecated and will not be
318 supported in cgit-1.0.
Lars Hjemlidf461232008-10-05 18:55:49 +0200319
Jason A. Donenfeld389cc172013-04-08 16:57:12 +0200320repository-sort::
321 The way in which repositories in each section are sorted. Valid values
322 are "name" for sorting by the repo name or "age" for sorting by the
323 most recently updated repository. Default value: "name". See also:
324 section, case-sensitive-sort, section-sort.
325
Lars Hjemlid3b29332009-02-12 09:58:28 +0100326robots::
Lars Hjemlidf461232008-10-05 18:55:49 +0200327 Text used as content for the "robots" meta-tag. Default value:
328 "index, nofollow".
329
Lars Hjemlid3b29332009-02-12 09:58:28 +0100330root-desc::
Lars Hjemlidf461232008-10-05 18:55:49 +0200331 Text printed below the heading on the repository index page. Default
332 value: "a fast webinterface for the git dscm".
333
Lars Hjemlid3b29332009-02-12 09:58:28 +0100334root-readme::
Lars Hjemlidf461232008-10-05 18:55:49 +0200335 The content of the file specified with this option will be included
336 verbatim below the "about" link on the repository index page. Default
337 value: none.
338
Lars Hjemlid3b29332009-02-12 09:58:28 +0100339root-title::
Lars Hjemlidf461232008-10-05 18:55:49 +0200340 Text printed as heading on the repository index page. Default value:
341 "Git Repository Browser".
342
Johan Herlanddf522792010-11-15 20:41:00 +0100343scan-hidden-path::
344 If set to "1" and scan-path is enabled, scan-path will recurse into
345 directories whose name starts with a period ('.'). Otherwise,
346 scan-path will stay away from such directories (considered as
347 "hidden"). Note that this does not apply to the ".git" directory in
348 non-bare repos. This must be defined prior to scan-path.
349 Default value: 0. See also: scan-path.
350
Lars Hjemli00466372009-08-23 19:35:56 +0200351scan-path::
352 A path which will be scanned for repositories. If caching is enabled,
353 the result will be cached as a cgitrc include-file in the cache
Jason A. Donenfeld35165022010-07-29 17:52:29 +0200354 directory. If project-list has been defined prior to scan-path,
355 scan-path loads only the directories listed in the file pointed to by
Julius Plenzfacca562011-03-10 17:03:24 +0100356 project-list. Be advised that only the global settings taken
357 before the scan-path directive will be applied to each repository.
Lars Hjemlief13e5e2011-06-13 21:58:39 +0000358 Default value: none. See also: cache-scanrc-ttl, project-list,
359 "MACRO EXPANSION".
Lars Hjemli00466372009-08-23 19:35:56 +0200360
Lars Hjemli007df982009-08-24 07:51:48 +0200361section::
Lars Hjemlie7af0022009-08-23 22:58:39 +0200362 The name of the current repository section - all repositories defined
363 after this option will inherit the current section name. Default value:
364 none.
365
Tobias Bieniek7a4e7c82012-10-09 20:53:29 +0200366section-sort::
367 Flag which, when set to "1", will sort the sections on the repository
368 listing by name. Set this flag to "0" if the order in the cgitrc file should
369 be preserved. Default value: "1". See also: section,
370 case-sensitive-sort, repository-sort.
Jason A. Donenfeld184c5652012-07-12 19:13:39 +0200371
Lars Hjemli797110e2010-08-21 15:44:09 +0200372section-from-path::
Jason A. Donenfelda8d613e2013-04-10 14:42:49 +0200373 A number which, if defined prior to scan-path, specifies how many
Lars Hjemli797110e2010-08-21 15:44:09 +0200374 path elements from each repo path to use as a default section name.
375 If negative, cgit will discard the specified number of path elements
Jason A. Donenfeld184c5652012-07-12 19:13:39 +0200376 above the repo directory. Default value: "0".
Lars Hjemli797110e2010-08-21 15:44:09 +0200377
Ragnar Ouchterlonyc358aa32009-09-14 20:19:02 +0200378side-by-side-diffs::
379 If set to "1" shows side-by-side diffs instead of unidiffs per
380 default. Default value: "0".
381
Lars Hjemlid3b29332009-02-12 09:58:28 +0100382snapshots::
Lars Hjemlib44c40e2009-08-24 08:00:37 +0200383 Text which specifies the default set of snapshot formats generated by
384 cgit. The value is a space-separated list of zero or more of the
Lars Hjemli4d2a3032011-03-26 13:40:20 +0100385 values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip". Default value:
386 none.
Lars Hjemlidf461232008-10-05 18:55:49 +0200387
Lars Hjemli46b7abe2009-07-31 16:55:27 +0200388source-filter::
389 Specifies a command which will be invoked to format plaintext blobs
390 in the tree view. The command will get the blob content on its STDIN
391 and the name of the blob as its only command line argument. The STDOUT
392 from the command will be included verbatim as the blob contents, i.e.
393 this can be used to implement e.g. syntax highlighting. Default value:
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100394 none. See also: "FILTER API".
Lars Hjemli46b7abe2009-07-31 16:55:27 +0200395
Lars Hjemlid3b29332009-02-12 09:58:28 +0100396summary-branches::
Lars Hjemlidf461232008-10-05 18:55:49 +0200397 Specifies the number of branches to display in the repository "summary"
398 view. Default value: "10".
399
Lars Hjemlid3b29332009-02-12 09:58:28 +0100400summary-log::
Lars Hjemlidf461232008-10-05 18:55:49 +0200401 Specifies the number of log entries to display in the repository
402 "summary" view. Default value: "10".
403
Lars Hjemlid3b29332009-02-12 09:58:28 +0100404summary-tags::
Lars Hjemlidf461232008-10-05 18:55:49 +0200405 Specifies the number of tags to display in the repository "summary"
406 view. Default value: "10".
407
Felix Hanleye0c6f232010-11-08 19:41:13 +0100408strict-export::
409 Filename which, if specified, needs to be present within the repository
410 for cgit to allow access to that repository. This can be used to emulate
411 gitweb's EXPORT_OK and STRICT_EXPORT functionality and limit cgit's
Jason A. Donenfelda8d613e2013-04-10 14:42:49 +0200412 repositories to match those exported by git-daemon. This option must
413 be defined prior to scan-path.
Felix Hanleye0c6f232010-11-08 19:41:13 +0100414
Lars Hjemlid3b29332009-02-12 09:58:28 +0100415virtual-root::
Lars Hjemlidf461232008-10-05 18:55:49 +0200416 Url which, if specified, will be used as root for all cgit links. It
417 will also cause cgit to generate 'virtual urls', i.e. urls like
418 '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default
419 value: none.
420 NOTE: cgit has recently learned how to use PATH_INFO to achieve the
421 same kind of virtual urls, so this option will probably be deprecated.
422
Jason A. Donenfeld521e10c2012-10-09 06:56:14 -0400423
Lars Hjemlidf461232008-10-05 18:55:49 +0200424REPOSITORY SETTINGS
425-------------------
Lars Hjemli537c05f2009-08-09 13:27:21 +0200426repo.about-filter::
Lars Hjemli2273c2c2009-08-24 08:53:21 +0200427 Override the default about-filter. Default value: none. See also:
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100428 "enable-filter-overrides". See also: "FILTER API".
Lars Hjemli537c05f2009-08-09 13:27:21 +0200429
Jason A. Donenfeld389cc172013-04-08 16:57:12 +0200430repo.branch-sort::
431 Flag which, when set to "age", enables date ordering in the branch ref
432 list, and when set to "name" enables ordering by branch name. Default
433 value: "name".
434
Lars Hjemlid3b29332009-02-12 09:58:28 +0100435repo.clone-url::
Lars Hjemlidf461232008-10-05 18:55:49 +0200436 A list of space-separated urls which can be used to clone this repo.
Lars Hjemlia1429db2011-06-06 20:49:13 +0000437 Default value: none. See also: "MACRO EXPANSION".
Lars Hjemlidf461232008-10-05 18:55:49 +0200438
Lars Hjemlie976df22009-08-09 13:22:00 +0200439repo.commit-filter::
Lars Hjemli2273c2c2009-08-24 08:53:21 +0200440 Override the default commit-filter. Default value: none. See also:
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100441 "enable-filter-overrides". See also: "FILTER API".
Lars Hjemlie976df22009-08-09 13:22:00 +0200442
Jason A. Donenfeld389cc172013-04-08 16:57:12 +0200443repo.commit-sort::
444 Flag which, when set to "date", enables strict date ordering in the
445 commit log, and when set to "topo" enables strict topological
446 ordering. If unset, the default ordering of "git log" is used. Default
447 value: unset.
448
Lars Hjemlid3b29332009-02-12 09:58:28 +0100449repo.defbranch::
Lars Hjemlidf461232008-10-05 18:55:49 +0200450 The name of the default branch for this repository. If no such branch
451 exists in the repository, the first branch name (when sorted) is used
Julius Plenzd711de52011-04-07 12:59:24 +0200452 as default instead. Default value: branch pointed to by HEAD, or
453 "master" if there is no suitable HEAD.
Lars Hjemlidf461232008-10-05 18:55:49 +0200454
Lars Hjemlid3b29332009-02-12 09:58:28 +0100455repo.desc::
Lars Hjemlidf461232008-10-05 18:55:49 +0200456 The value to show as repository description. Default value: none.
457
Johan Herland9a8d39c2010-11-15 18:39:50 +0100458repo.enable-commit-graph::
459 A flag which can be used to disable the global setting
460 `enable-commit-graph'. Default value: none.
461
Lars Hjemlid3b29332009-02-12 09:58:28 +0100462repo.enable-log-filecount::
Lars Hjemlidf461232008-10-05 18:55:49 +0200463 A flag which can be used to disable the global setting
464 `enable-log-filecount'. Default value: none.
465
Lars Hjemlid3b29332009-02-12 09:58:28 +0100466repo.enable-log-linecount::
Lars Hjemlidf461232008-10-05 18:55:49 +0200467 A flag which can be used to disable the global setting
468 `enable-log-linecount'. Default value: none.
469
Lars Hjemli41934a32009-11-07 19:10:58 +0100470repo.enable-remote-branches::
471 Flag which, when set to "1", will make cgit display remote branches
472 in the summary and refs views. Default value: <enable-remote-branches>.
473
Lars Hjemli581a0c22010-02-27 13:12:55 +0100474repo.enable-subject-links::
475 A flag which can be used to override the global setting
476 `enable-subject-links'. Default value: none.
477
Bernhard Reutner-Fischer808c6852010-12-23 12:47:54 +0100478repo.logo::
479 Url which specifies the source of an image which will be used as a logo
480 on this repo's pages. Default value: global logo.
481
482repo.logo-link::
483 Url loaded when clicking on the cgit logo image. If unspecified the
484 calculated url of the repository index page will be used. Default
485 value: global logo-link.
486
Lars Hjemli46ca32e2011-06-15 09:58:42 +0200487repo.module-link::
488 Text which will be used as the formatstring for a hyperlink when a
489 submodule is printed in a directory listing. The arguments for the
490 formatstring are the path and SHA1 of the submodule commit. Default
491 value: <module-link>
492
Lars Hjemli6857bec2011-06-15 10:04:13 +0200493repo.module-link.<path>::
494 Text which will be used as the formatstring for a hyperlink when a
495 submodule with the specified subdirectory path is printed in a
496 directory listing. The only argument for the formatstring is the SHA1
497 of the submodule commit. Default value: none.
498
Lars Hjemlid3b29332009-02-12 09:58:28 +0100499repo.max-stats::
Lars Hjemlifb2f3f62008-12-07 13:17:21 +0100500 Override the default maximum statistics period. Valid values are equal
501 to the values specified for the global "max-stats" setting. Default
502 value: none.
Lars Hjemlif86a23f2008-12-06 17:38:19 +0100503
Lars Hjemlid3b29332009-02-12 09:58:28 +0100504repo.name::
Lars Hjemlidf461232008-10-05 18:55:49 +0200505 The value to show as repository name. Default value: <repo.url>.
506
Lars Hjemlid3b29332009-02-12 09:58:28 +0100507repo.owner::
Lars Hjemlidf461232008-10-05 18:55:49 +0200508 A value used to identify the owner of the repository. Default value:
509 none.
510
Lars Hjemlid3b29332009-02-12 09:58:28 +0100511repo.path::
Lars Hjemlidf461232008-10-05 18:55:49 +0200512 An absolute path to the repository directory. For non-bare repositories
513 this is the .git-directory. Default value: none.
514
Lars Hjemlid3b29332009-02-12 09:58:28 +0100515repo.readme::
Lars Hjemlidf461232008-10-05 18:55:49 +0200516 A path (relative to <repo.path>) which specifies a file to include
Jason A. Donenfeld379e80e2010-08-04 00:45:42 +0200517 verbatim as the "About" page for this repo. You may also specify a
518 git refspec by head or by hash by prepending the refspec followed by
Jason A. Donenfeld3cb5d862013-05-25 14:19:10 +0200519 a colon. For example, "master:docs/readme.mkd". If the value begins
520 with a colon, i.e. ":docs/readme.rst", the default branch of the
Jason A. Donenfeld2a1ead32013-05-25 20:30:57 +0200521 repository will be used. Sharing any file will expose that entire
522 directory tree to the "/about/PATH" endpoints, so be sure that there
523 are no non-public files located in the same directory as the readme
524 file. Default value: <readme>.
Lars Hjemlidf461232008-10-05 18:55:49 +0200525
Lars Hjemlid3b29332009-02-12 09:58:28 +0100526repo.snapshots::
Lars Hjemlidf461232008-10-05 18:55:49 +0200527 A mask of allowed snapshot-formats for this repo, restricted by the
528 "snapshots" global setting. Default value: <snapshots>.
529
Lars Hjemli39398542009-08-23 23:00:28 +0200530repo.section::
Lars Hjemli007df982009-08-24 07:51:48 +0200531 Override the current section name for this repository. Default value:
532 none.
Lars Hjemli39398542009-08-23 23:00:28 +0200533
Lars Hjemlie976df22009-08-09 13:22:00 +0200534repo.source-filter::
Lars Hjemli2273c2c2009-08-24 08:53:21 +0200535 Override the default source-filter. Default value: none. See also:
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100536 "enable-filter-overrides". See also: "FILTER API".
Lars Hjemlie976df22009-08-09 13:22:00 +0200537
Lars Hjemlid3b29332009-02-12 09:58:28 +0100538repo.url::
Lars Hjemlidf461232008-10-05 18:55:49 +0200539 The relative url used to access the repository. This must be the first
540 setting specified for each repo. Default value: none.
541
542
Lars Hjemli74061ed2009-08-24 00:04:58 +0200543REPOSITORY-SPECIFIC CGITRC FILE
544-------------------------------
Lars Hjemli007df982009-08-24 07:51:48 +0200545When the option "scan-path" is used to auto-discover git repositories, cgit
546will try to parse the file "cgitrc" within any found repository. Such a
547repo-specific config file may contain any of the repo-specific options
Lars Hjemli2273c2c2009-08-24 08:53:21 +0200548described above, except "repo.url" and "repo.path". Additionally, the "filter"
549options are only acknowledged in repo-specific config files when
550"enable-filter-overrides" is set to "1".
551
552Note: the "repo." prefix is dropped from the option names in repo-specific
553config files, e.g. "repo.desc" becomes "desc".
Lars Hjemli74061ed2009-08-24 00:04:58 +0200554
555
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100556FILTER API
557----------
Lars Hjemlib88cda62011-06-13 22:34:13 +0000558about filter::
Jason A. Donenfeldc0dfaf12013-05-25 14:50:19 +0200559 This filter is given a single parameter: the filename of the source
560 file to filter. The filter can use the filename to determine (for
561 example) the type of syntax to follow when formatting the readme file.
562 The about text that is to be filtered is available on standard input
563 and the filtered text is expected on standard output.
Lars Hjemlib88cda62011-06-13 22:34:13 +0000564
565commit filter::
566 This filter is given no arguments. The commit message text that is to
567 be filtered is available on standard input and the filtered text is
568 expected on standard output.
569
570source filter::
571 This filter is given a single parameter: the filename of the source
572 file to filter. The filter can use the filename to determine (for
573 example) the syntax highlighting mode. The contents of the source
574 file that is to be filtered is available on standard input and the
575 filtered contents is expected on standard output.
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100576
577Also, all filters are handed the following environment variables:
Lars Hjemlib88cda62011-06-13 22:34:13 +0000578
579- CGIT_REPO_URL (from repo.url)
580- CGIT_REPO_NAME (from repo.name)
581- CGIT_REPO_PATH (from repo.path)
582- CGIT_REPO_OWNER (from repo.owner)
583- CGIT_REPO_DEFBRANCH (from repo.defbranch)
584- CGIT_REPO_SECTION (from repo.section)
585- CGIT_REPO_CLONE_URL (from repo.clone-url)
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100586
587If a setting is not defined for a repository and the corresponding global
588setting is also not defined (if applicable), then the corresponding
Lukas Fleischerd96d2c92011-09-14 11:52:43 +0200589environment variable will be unset.
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100590
Ferry Hubertsb2cf6302011-03-23 11:57:44 +0100591
Lars Hjemlief13e5e2011-06-13 21:58:39 +0000592MACRO EXPANSION
593---------------
594The following cgitrc options supports a simple macro expansion feature,
595where tokens prefixed with "$" are replaced with the value of a similary
596named environment variable:
597
598- cache-root
599- include
600- project-list
601- scan-path
602
603Macro expansion will also happen on the content of $CGIT_CONFIG, if
604defined.
605
606One usage of this feature is virtual hosting, which in its simplest form
607can be accomplished by adding the following line to /etc/cgitrc:
608
609 include=/etc/cgitrc.d/$HTTP_HOST
610
Lars Hjemlia1429db2011-06-06 20:49:13 +0000611The following options are expanded during request processing, and support
612the environment variables defined in "FILTER API":
613
614- clone-url
615- repo.clone-url
616
Lars Hjemlief13e5e2011-06-13 21:58:39 +0000617
Lars Hjemlidf461232008-10-05 18:55:49 +0200618EXAMPLE CGITRC FILE
619-------------------
620
Lars Hjemlib875a9e2009-02-12 10:02:09 +0100621....
Lars Hjemlidf461232008-10-05 18:55:49 +0200622# Enable caching of up to 1000 output entriess
623cache-size=1000
624
625
Lars Hjemlia1429db2011-06-06 20:49:13 +0000626# Specify some default clone urls using macro expansion
627clone-url=git://foo.org/$CGIT_REPO_URL git@foo.org:$CGIT_REPO_URL
Lars Hjemlidf461232008-10-05 18:55:49 +0200628
629# Specify the css url
630css=/css/cgit.css
631
632
Jason A. Donenfeldd6d3dbc2013-05-27 21:47:02 +0200633# Show owner on index page
634enable-index-owner=1
635
636
637# Allow http transport git clone
638enable-git-clone=1
639
640
Lars Hjemlidf461232008-10-05 18:55:49 +0200641# Show extra links for each repository on the index page
642enable-index-links=1
643
644
Johan Herland9a8d39c2010-11-15 18:39:50 +0100645# Enable ASCII art commit history graph on the log pages
646enable-commit-graph=1
647
648
Lars Hjemlidf461232008-10-05 18:55:49 +0200649# Show number of affected files per commit on the log pages
650enable-log-filecount=1
651
652
653# Show number of added/removed lines per commit on the log pages
654enable-log-linecount=1
655
656
Jason A. Donenfeldd6d3dbc2013-05-27 21:47:02 +0200657# Sort branches by date
658branch-sort=age
659
660
Lars Hjemlidf461232008-10-05 18:55:49 +0200661# Add a cgit favicon
662favicon=/favicon.ico
663
664
665# Use a custom logo
666logo=/img/mylogo.png
667
668
Lars Hjemlifb2f3f62008-12-07 13:17:21 +0100669# Enable statistics per week, month and quarter
670max-stats=quarter
671
672
Lars Hjemlidf461232008-10-05 18:55:49 +0200673# Set the title and heading of the repository index page
Todd Zullinger66df1132010-09-06 09:31:26 -0400674root-title=example.com git repositories
Lars Hjemlidf461232008-10-05 18:55:49 +0200675
676
677# Set a subheading for the repository index page
678root-desc=tracking the foobar development
679
680
Todd Zullinger66df1132010-09-06 09:31:26 -0400681# Include some more info about example.com on the index page
Lars Hjemlidf461232008-10-05 18:55:49 +0200682root-readme=/var/www/htdocs/about.html
683
684
Todd Zullinger3796c2d2009-01-11 18:23:39 -0500685# Allow download of tar.gz, tar.bz2 and zip-files
686snapshots=tar.gz tar.bz2 zip
Lars Hjemlidf461232008-10-05 18:55:49 +0200687
688
689##
Lars Hjemlic4d46c72009-02-13 20:43:30 +0100690## List of common mimetypes
691##
692
Johan Herland9ce5d052010-06-10 01:09:22 +0200693mimetype.gif=image/gif
Lars Hjemlic4d46c72009-02-13 20:43:30 +0100694mimetype.html=text/html
695mimetype.jpg=image/jpeg
696mimetype.jpeg=image/jpeg
697mimetype.pdf=application/pdf
698mimetype.png=image/png
699mimetype.svg=image/svg+xml
700
701
Jason A. Donenfeldd6d3dbc2013-05-27 21:47:02 +0200702# Highlight source code with python pygments-based highligher
703source-filter=/var/www/cgit/filters/syntax-highlighting.py
704
705# Format markdown, restructuredtext, manpages, text files, and html files
706# through the right converters
707about-filter=/var/www/cgit/filters/about-formatting.sh
708
709##
710## Search for these files in the root of the default branch of repositories
711## for coming up with the about page:
712##
713readme=:README.md
714readme=:readme.md
715readme=:README.mkd
716readme=:readme.mkd
717readme=:README.rst
718readme=:readme.rst
719readme=:README.html
720readme=:readme.html
721readme=:README.htm
722readme=:readme.htm
723readme=:README.txt
724readme=:readme.txt
725readme=:README
726readme=:readme
727readme=:INSTALL.md
728readme=:install.md
729readme=:INSTALL.mkd
730readme=:install.mkd
731readme=:INSTALL.rst
732readme=:install.rst
733readme=:INSTALL.html
734readme=:install.html
735readme=:INSTALL.htm
736readme=:install.htm
737readme=:INSTALL.txt
738readme=:install.txt
739readme=:INSTALL
740readme=:install
741
742
Lars Hjemlic4d46c72009-02-13 20:43:30 +0100743##
Lars Hjemlidf461232008-10-05 18:55:49 +0200744## List of repositories.
Loui Chang8071e182009-09-14 01:21:11 -0400745## PS: Any repositories listed when section is unset will not be
746## displayed under a section heading
Lars Hjemlidf461232008-10-05 18:55:49 +0200747## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
748## and included like this:
749## include=/etc/cgitrepos
750##
751
752
753repo.url=foo
754repo.path=/pub/git/foo.git
755repo.desc=the master foo repository
Todd Zullinger66df1132010-09-06 09:31:26 -0400756repo.owner=fooman@example.com
Lars Hjemlidf461232008-10-05 18:55:49 +0200757repo.readme=info/web/about.html
758
759
760repo.url=bar
761repo.path=/pub/git/bar.git
762repo.desc=the bars for your foo
Todd Zullinger66df1132010-09-06 09:31:26 -0400763repo.owner=barman@example.com
Lars Hjemlidf461232008-10-05 18:55:49 +0200764repo.readme=info/web/about.html
765
766
767# The next repositories will be displayed under the 'extras' heading
Loui Chang8071e182009-09-14 01:21:11 -0400768section=extras
Lars Hjemlidf461232008-10-05 18:55:49 +0200769
770
771repo.url=baz
772repo.path=/pub/git/baz.git
773repo.desc=a set of extensions for bar users
774
775repo.url=wiz
776repo.path=/pub/git/wiz.git
777repo.desc=the wizard of foo
778
779
780# Add some mirrored repositories
Loui Chang8071e182009-09-14 01:21:11 -0400781section=mirrors
Lars Hjemlidf461232008-10-05 18:55:49 +0200782
783
784repo.url=git
785repo.path=/pub/git/git.git
786repo.desc=the dscm
787
788
789repo.url=linux
790repo.path=/pub/git/linux.git
791repo.desc=the kernel
792
793# Disable adhoc downloads of this repo
794repo.snapshots=0
795
796# Disable line-counts for this repo
797repo.enable-log-linecount=0
798
Lars Hjemlifb2f3f62008-12-07 13:17:21 +0100799# Restrict the max statistics period for this repo
800repo.max-stats=month
Lars Hjemlib875a9e2009-02-12 10:02:09 +0100801....
Lars Hjemlifb2f3f62008-12-07 13:17:21 +0100802
Lars Hjemlidf461232008-10-05 18:55:49 +0200803
804BUGS
805----
806Comments currently cannot appear on the same line as a setting; the comment
807will be included as part of the value. E.g. this line:
808
809 robots=index # allow indexing
810
811will generate the following html element:
812
813 <meta name='robots' content='index # allow indexing'/>
814
815
816
817AUTHOR
818------
819Lars Hjemli <hjemli@gmail.com>
Jason A. Donenfeld2e4a9412010-07-29 19:47:50 +0200820Jason A. Donenfeld <Jason@zx2c4.com>