author | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 13:47:56 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 13:47:56 (UTC) |
commit | ac70cb4795c90db02917db63d169b0fadfe9fb99 (patch) (unidiff) | |
tree | bf7a5c4c8c2789cda2dd511f0a180df279a0b389 /cgitrc | |
parent | ab2ab95f09994560f62fd631f07d3b6e3577aa6e (diff) | |
download | cgit-ac70cb4795c90db02917db63d169b0fadfe9fb99.zip cgit-ac70cb4795c90db02917db63d169b0fadfe9fb99.tar.gz cgit-ac70cb4795c90db02917db63d169b0fadfe9fb99.tar.bz2 |
Make snapshot feature configurable
Snapshots can now be enabled/disabled by default for all repositories in
cgitrc with param "snapshots". Additionally, any repo can override the
default setting with param "repo.snapshots".
By default, no snapshotting is enabled.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgitrc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,79 +1,84 @@ | |||
1 | ## | 1 | ## |
2 | ## cgitrc: template for /etc/cgitrc | 2 | ## cgitrc: template for /etc/cgitrc |
3 | ## | 3 | ## |
4 | 4 | ||
5 | 5 | ||
6 | ## Uncomment and set to 1 to deactivate caching of generated pages. Mostly | 6 | ## Uncomment and set to 1 to deactivate caching of generated pages. Mostly |
7 | ## usefull for testing. | 7 | ## usefull for testing. |
8 | #nocache=0 | 8 | #nocache=0 |
9 | 9 | ||
10 | 10 | ||
11 | ## Enable/disable snapshots by default. This can be overridden per repo | ||
12 | #snapshots=0 | ||
13 | |||
14 | |||
11 | ## Specify a root for virtual urls. This makes cgit generate urls like | 15 | ## Specify a root for virtual urls. This makes cgit generate urls like |
12 | ## | 16 | ## |
13 | ## http://localhost/git/repo/log/?id=master | 17 | ## http://localhost/git/repo/log/?id=master |
14 | ## | 18 | ## |
15 | ## instead of | 19 | ## instead of |
16 | ## | 20 | ## |
17 | ## http://localhost/cgit/cgit.cgi?r=repo&p=log&id=master | 21 | ## http://localhost/cgit/cgit.cgi?r=repo&p=log&id=master |
18 | ## | 22 | ## |
19 | ## For this to work with apache, rewrite rules must be added to httpd.conf, | 23 | ## For this to work with apache, rewrite rules must be added to httpd.conf, |
20 | ## possibly looking something like this: | 24 | ## possibly looking something like this: |
21 | ## | 25 | ## |
22 | ## RewriteRule ^/git/$ /cgit/cgit.cgi [L,QSA] | 26 | ## RewriteRule ^/git/$ /cgit/cgit.cgi [L,QSA] |
23 | ## RewriteRule ^/git/([^/]+)/$ /cgit/cgit.cgi?r=$1 [L,QSA] | 27 | ## RewriteRule ^/git/([^/]+)/$ /cgit/cgit.cgi?r=$1 [L,QSA] |
24 | ## RewriteRule ^/git/([^/]+)/([^/]+)/$ /cgit/cgit.cgi?r=$1&p=$2 [L,QSA] | 28 | ## RewriteRule ^/git/([^/]+)/([^/]+)/$ /cgit/cgit.cgi?r=$1&p=$2 [L,QSA] |
25 | ## | 29 | ## |
26 | ## This setting is disabled by default. | 30 | ## This setting is disabled by default. |
27 | #virtual-root=/git | 31 | #virtual-root=/git |
28 | 32 | ||
29 | 33 | ||
30 | ## Set the title printed on the root page | 34 | ## Set the title printed on the root page |
31 | #root-title=Git repository browser | 35 | #root-title=Git repository browser |
32 | 36 | ||
33 | 37 | ||
34 | ## Link to css file | 38 | ## Link to css file |
35 | #css=/cgit/cgit.css | 39 | #css=/cgit/cgit.css |
36 | 40 | ||
37 | 41 | ||
38 | ## Link to logo file | 42 | ## Link to logo file |
39 | #logo=/cgit/git-logo.png | 43 | #logo=/cgit/git-logo.png |
40 | 44 | ||
41 | 45 | ||
42 | ## Url loaded when clicking the logo | 46 | ## Url loaded when clicking the logo |
43 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ | 47 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ |
44 | 48 | ||
45 | 49 | ||
46 | ## Number of chars shown of commit subject message (in log view) | 50 | ## Number of chars shown of commit subject message (in log view) |
47 | #max-message-length=60 | 51 | #max-message-length=60 |
48 | 52 | ||
49 | 53 | ||
50 | ## Root of cached output | 54 | ## Root of cached output |
51 | #cache-root=/var/cache/cgit | 55 | #cache-root=/var/cache/cgit |
52 | 56 | ||
53 | 57 | ||
54 | ## | 58 | ## |
55 | ## Time-To-Live settings: specifies how long (in minutes) different pages | 59 | ## Time-To-Live settings: specifies how long (in minutes) different pages |
56 | ## should be cached (0 for instant expiration, -1 for immortal pages) | 60 | ## should be cached (0 for instant expiration, -1 for immortal pages) |
57 | ## | 61 | ## |
58 | 62 | ||
59 | ## ttl for root page | 63 | ## ttl for root page |
60 | #cache-root-ttl=5 | 64 | #cache-root-ttl=5 |
61 | 65 | ||
62 | ## ttl for repo summary page | 66 | ## ttl for repo summary page |
63 | #cache-repo-ttl=5 | 67 | #cache-repo-ttl=5 |
64 | 68 | ||
65 | ## ttl for other dynamic pages | 69 | ## ttl for other dynamic pages |
66 | #cache-dynamic-ttl=5 | 70 | #cache-dynamic-ttl=5 |
67 | 71 | ||
68 | ## ttl for static pages (addressed by SHA-1) | 72 | ## ttl for static pages (addressed by SHA-1) |
69 | #cache-static-ttl=-1 | 73 | #cache-static-ttl=-1 |
70 | 74 | ||
71 | 75 | ||
72 | 76 | ||
73 | ## Example repository entry. Required values are repo.url and repo.path (each | 77 | ## Example repository entry. Required values are repo.url and repo.path (each |
74 | ## repository section must start with repo.url). | 78 | ## repository section must start with repo.url). |
75 | #repo.url=cgit | 79 | #repo.url=cgit |
76 | #repo.name=cgit | 80 | #repo.name=cgit |
77 | #repo.desc=the caching cgi for git | 81 | #repo.desc=the caching cgi for git |
78 | #repo.path=/pub/git/cgit | 82 | #repo.path=/pub/git/cgit |
79 | #repo.owner=Lars Hjemli | 83 | #repo.owner=Lars Hjemli |
84 | #repo.snapshots=1 # override a sitewide snapshot-setting | ||