author | Chris Pickel <sfiera@macports.org> | 2007-09-08 23:37:43 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-09-09 07:53:59 (UTC) |
commit | 0602d8c4f0b6752c59fd417364b26ed9447f3743 (patch) (unidiff) | |
tree | ef304065dd287251d07636463ac8f106c752c230 /cgitrc | |
parent | 4beecc9a1873a603cd9b438e317ca385c79af92d (diff) | |
download | cgit-0602d8c4f0b6752c59fd417364b26ed9447f3743.zip cgit-0602d8c4f0b6752c59fd417364b26ed9447f3743.tar.gz cgit-0602d8c4f0b6752c59fd417364b26ed9447f3743.tar.bz2 |
Improve the sample cgitrc file
Added and documented missing cgitrc parameters, improved documentation
for virtual-root, added examples for repositories with a working
directory.
[lh:sligthly modified/extended]
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgitrc | 63 |
1 files changed, 51 insertions, 12 deletions
@@ -21,47 +21,67 @@ | |||
21 | #enable-log-filecount=0 | 21 | #enable-log-filecount=0 |
22 | 22 | ||
23 | 23 | ||
24 | ## Enable/disable display of 'number of lines changed' in log view | 24 | ## Enable/disable display of 'number of lines changed' in log view |
25 | #enable-log-linecount=0 | 25 | #enable-log-linecount=0 |
26 | 26 | ||
27 | 27 | ||
28 | ## Enable/disable display of HEAD shortlog in summary view. Set it to maximum | 28 | ## Enable/disable display of HEAD shortlog in summary view. Set it to maximum |
29 | ## number of commits that should be displayed | 29 | ## number of commits that should be displayed |
30 | #summary-log=0 | 30 | #summary-log=0 |
31 | 31 | ||
32 | 32 | ||
33 | ## The "Idle" column on the repository index page can read a timestamp | ||
34 | ## from the specified agefile (if this file cannot be found, the mtime | ||
35 | ## of HEAD is used). | ||
36 | ## The cgit repo on hjemli.net uses the the following command in it's | ||
37 | ## post-receive hook to update the age-file: | ||
38 | ## git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ | ||
39 | ## --count=1 > $GIT_DIR/info/web/last-modifie | ||
40 | ## | ||
41 | #agefile=info/web/last-modified | ||
42 | |||
43 | |||
33 | ## Specify a root for virtual urls. This makes cgit generate urls like | 44 | ## Specify a root for virtual urls. This makes cgit generate urls like |
34 | ## | 45 | ## |
35 | ## http://localhost/git/repo/log/?id=master | 46 | ## http://localhost/git/repo/log/?h=branch |
36 | ## | 47 | ## |
37 | ## instead of | 48 | ## instead of |
38 | ## | 49 | ## |
39 | ## http://localhost/cgit/cgit.cgi?r=repo&p=log&id=master | 50 | ## http://localhost/cgit/cgit.cgi?url=repo/log&h=branch |
40 | ## | 51 | ## |
41 | ## For this to work with apache, rewrite rules must be added to httpd.conf, | 52 | ## For this to work with apache, a rewrite rule must be added to httpd.conf, |
42 | ## possibly looking something like this: | 53 | ## possibly looking something like this: |
43 | ## | 54 | ## |
44 | ## RewriteRule ^/git/$ /cgit/cgit.cgi [L,QSA] | 55 | ## RewriteRule ^/git/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] |
45 | ## RewriteRule ^/git/([^/]+)/$ /cgit/cgit.cgi?r=$1 [L,QSA] | 56 | ## |
46 | ## RewriteRule ^/git/([^/]+)/([^/]+)/$ /cgit/cgit.cgi?r=$1&p=$2 [L,QSA] | 57 | ## For this to work with lighttpd, the rewrite rule should look more like this: |
58 | ## | ||
59 | ## url.rewrite = ( | ||
60 | ## "^/git/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" | ||
61 | ## ) | ||
47 | ## | 62 | ## |
48 | ## This setting is disabled by default. | 63 | ## This setting is disabled by default. |
49 | #virtual-root=/git | 64 | #virtual-root=/git |
50 | 65 | ||
51 | 66 | ||
52 | ## Set the title printed on the root page | 67 | ## Set the title printed on the root page |
53 | #root-title=Git repository browser | 68 | #root-title=Git repository browser |
54 | 69 | ||
55 | 70 | ||
71 | ## If specified, the file at this path will be included as HTML in the index | ||
72 | ## of repositories | ||
73 | #index-header= | ||
74 | |||
75 | |||
56 | ## Link to css file | 76 | ## Link to css file |
57 | #css=/cgit/cgit.css | 77 | #css=/cgit/cgit.css |
58 | 78 | ||
59 | 79 | ||
60 | ## Link to logo file | 80 | ## Link to logo file |
61 | #logo=/cgit/git-logo.png | 81 | #logo=/cgit/git-logo.png |
62 | 82 | ||
63 | 83 | ||
64 | ## Url loaded when clicking the logo | 84 | ## Url loaded when clicking the logo |
65 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ | 85 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ |
66 | 86 | ||
67 | 87 | ||
@@ -103,19 +123,38 @@ | |||
103 | #cache-dynamic-ttl=5 | 123 | #cache-dynamic-ttl=5 |
104 | 124 | ||
105 | ## ttl for static pages (addressed by SHA-1) | 125 | ## ttl for static pages (addressed by SHA-1) |
106 | #cache-static-ttl=-1 | 126 | #cache-static-ttl=-1 |
107 | 127 | ||
108 | 128 | ||
109 | 129 | ||
110 | ## Example repository entry. Required values are repo.url and repo.path (each | 130 | ## Example repository entry. Required values are repo.url and repo.path (each |
111 | ## repository section must start with repo.url). | 131 | ## repository section must start with repo.url). |
112 | #repo.url=cgit | 132 | #repo.url=cgit |
113 | #repo.name=cgit | 133 | #repo.name=cgit |
114 | #repo.desc=the caching cgi for git | 134 | #repo.desc=the caching cgi for git |
115 | #repo.path=/pub/git/cgit | 135 | #repo.path=/pub/git/cgit ## this is the path to $GIR_DIR |
116 | #repo.owner=Lars Hjemli | 136 | #repo.owner=Lars Hjemli |
117 | #repo.snapshots=tar.bz2 # override a sitewide snapshot-setting | 137 | #repo.defbranch=master ## define a default branch |
118 | #repo.enable-log-filecount=0 # override the default filecount setting | 138 | #repo.snapshots=tar.bz2 ## override a sitewide snapshot-setting |
119 | #repo.enable-log-linecount=0 # override the default linecount setting | 139 | #repo.enable-log-filecount=0 ## override the default filecount setting |
120 | #repo.module-link=/git/%s/commit/?id=%s # override the standard module-link | 140 | #repo.enable-log-linecount=0 ## override the default linecount setting |
121 | #repo.readme=info/web/readme # specify a file to include on summary page | 141 | #repo.module-link=/git/%s/commit/?id=%s ## override the standard module-link |
142 | #repo.readme=info/web/readme ## specify a file to include on summary page | ||
143 | |||
144 | ## Additional repositories grouped under "mirrors" | ||
145 | #repo.group=mirrors | ||
146 | |||
147 | #repo.url=git | ||
148 | #repo.path=/pub/git/git | ||
149 | # | ||
150 | #repo.url=linux | ||
151 | #repo.path=/pub/git/linux | ||
152 | |||
153 | ## A group of private repositories (with a working directory) | ||
154 | #repo.group=private | ||
155 | |||
156 | #repo.url=larsh/cgit | ||
157 | #repo.path=/home/larsh/src/cgit/.git | ||
158 | |||
159 | #repo.url=larsh/git | ||
160 | #repo.path=/home/larsh/src/git/.git | ||