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
@@ -30,20 +30,35 @@ | |||
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 |
@@ -53,6 +68,11 @@ | |||
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 | ||
@@ -112,10 +132,29 @@ | |||
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 | ||