Git::RepoCGI: Introduce $mirror and $push configuration variables
[girocco.git] / gitweb_config.perl
blobaa411da85ef0a400f499d73dcd7ee22fe7dc503f
1 # Base web paths
2 our $_web_path = "/";
3 our $_cgi_web_path = "/";
4 our $my_uri = 'http://repo.or.cz/w';
6 ## core git executable to use
7 ## this can just be "git" if your webserver has a sensible PATH
8 our $GIT = "/home/pasky/bin/git";
10 ## absolute fs-path which will be prepended to the project path
11 our $projectroot = "/srv/git";
13 ## fs traversing limit for getting project list
14 ## the number is relative to the projectroot
15 #our $project_maxdepth = "2007";
17 ## target of the home link on top of all pages
18 our $home_link = "$_cgi_web_path";
20 ## string of the home link on top of all pages
21 our $home_link_str = "repo.or.cz";
23 ## name of your site or organization to appear in page titles
24 ## replace this with something more descriptive for clearer bookmarks
25 our $site_name = "Public Git Hosting";
26 ## filename of html text to include at top of each page
27 #our $site_header = "";
28 ## html text to include at home page
29 #our $home_text = "indextext.html";
30 ## filename of html text to include at bottom of each page
31 #our $site_footer = "";
33 ## URI of stylesheets
34 our @stylesheets = ("$_web_path/gitweb.css");
35 ## URI of a single stylesheet, which can be overridden in GITWEB_CONFIG.
36 #our $stylesheet = undef;
37 ## URI of GIT logo (72x27 size)
38 our $logo = "$_web_path/git-logo.png";
39 ## URI of GIT favicon, assumed to be image/png type
40 our $favicon = "$_web_path/git-favicon.png";
41 ## URI of blame.js
42 our $blamejs = "$_web_path/blame.js";
43 ## URI of gitweb.js
44 our $gitwebjs = "$_web_path/gitweb.js";
46 ## URI and label (title) of GIT logo link
47 ##our $logo_url = "http://www.kernel.org/pub/software/scm/git/docs/";
48 ##our $logo_label = "git documentation";
49 #our $logo_url = "http://git.or.cz/";
50 #our $logo_label = "git homepage";
52 ## source of projects list
53 #our $projects_list = "";
55 ## the width (in characters) of the projects list "Description" column
56 #our $projects_list_description_width = 25;
58 ## default order of projects list
59 ## valid values are none, project, descr, owner, and age
60 #our $default_projects_order = "project";
62 ## show repository only if this file exists
63 ## (only effective if this variable evaluates to true)
64 #our $export_ok = "";
66 ## only allow viewing of repositories also shown on the overview page
67 #our $strict_export = "";
69 ## list of git base URLs used for URL to where fetch project from,
70 ## i.e. full URL is "$git_base_url/$project"
71 our @git_base_url_list = ("git://repo.or.cz", "http://repo.or.cz/r");
73 ## default blob_plain mimetype and default charset for text/plain blob
74 #our $default_blob_plain_mimetype = 'text/plain';
75 #our $default_text_plain_charset = undef;
77 ## file to use for guessing MIME types before trying /etc/mime.types
78 ## (relative to the current git repository)
79 #our $mimetypes_file = undef;
81 ## assume this charset if line contains non-UTF-8 characters;
82 ## it should be valid encoding (see Encoding::Supported(3pm) for list),
83 ## for which encoding all byte sequences are valid, for example
84 ## 'iso-8859-1' aka 'latin1' (it is decoded without checking, so it
85 ## could be even 'utf-8' for the old behavior)
86 #our $fallback_encoding = 'latin1';
88 ## rename detection options for git-diff and git-diff-tree
89 ## - default is '-M', with the cost proportional to
90 ## (number of removed files) * (number of new files).
91 ## - more costly is '-C' (which implies '-M'), with the cost proportional to
92 ## (number of changed files + number of removed files) * (number of new files)
93 ## - even more costly is '-C', '--find-copies-harder' with cost
94 ## (number of files in the original tree) * (number of new files)
95 ## - one might want to include '-B' option, e.g. '-B', '-M'
96 #our @diff_opts = ('-M'); # taken from git_commit
98 ## projects list cache for busy sites with many projects;
99 ## if you set this to non-zero, it will be used as the cached
100 ## index lifetime in minutes
102 ## the cached list version is stored in $cache_dir/$cache_name and can
103 ## be tweaked by other scripts running with the same uid as gitweb -
104 ## use this ONLY at secure installations; only single gitweb project
105 ## root per system is supported, unless you tweak configuration!
106 #our $projlist_cache_lifetime = 0; # in minutes
107 our $projlist_cache_lifetime = 10;
108 ## FHS compliant $cache_dir would be "/var/cache/gitweb"
109 #our $cache_dir =
110 # (defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : '/tmp').'/gitweb';
111 #our $projlist_cache_name = 'gitweb.index.cache';
113 ## information about snapshot formats that gitweb is capable of serving
114 #our %known_snapshot_formats = (
115 # # name => {
116 # # 'display' => display name,
117 # # 'type' => mime type,
118 # # 'suffix' => filename suffix,
119 # # 'format' => --format for git-archive,
120 # # 'compressor' => [compressor command and arguments]
121 # # (array reference, optional)}
123 # 'tgz' => {
124 # 'display' => 'tar.gz',
125 # 'type' => 'application/x-gzip',
126 # 'suffix' => '.tar.gz',
127 # 'format' => 'tar',
128 # 'compressor' => ['gzip']},
130 # 'tbz2' => {
131 # 'display' => 'tar.bz2',
132 # 'type' => 'application/x-bzip2',
133 # 'suffix' => '.tar.bz2',
134 # 'format' => 'tar',
135 # 'compressor' => ['bzip2']},
137 # 'zip' => {
138 # 'display' => 'zip',
139 # 'type' => 'application/x-zip',
140 # 'suffix' => '.zip',
141 # 'format' => 'zip'},
144 ## Aliases so we understand old gitweb.snapshot values in repository
145 ## configuration.
146 #our %known_snapshot_format_aliases = (
147 # 'gzip' => 'tgz',
148 # 'bzip2' => 'tbz2',
150 # # backward compatibility: legacy gitweb config support
151 # 'x-gzip' => undef, 'gz' => undef,
152 # 'x-bzip2' => undef, 'bz2' => undef,
153 # 'x-zip' => undef, '' => undef,
156 ## You define site-wide feature defaults here; override them with
157 ## $GITWEB_CONFIG as necessary.
158 #our %feature = (
159 # # feature => {
160 # # 'sub' => feature-sub (subroutine),
161 # # 'override' => allow-override (boolean),
162 # # 'default' => [ default options...] (array reference)}
164 # # if feature is overridable (it means that allow-override has true value),
165 # # then feature-sub will be called with default options as parameters;
166 # # return value of feature-sub indicates if to enable specified feature
168 # # if there is no 'sub' key (no feature-sub), then feature cannot be
169 # # overriden
171 # # use gitweb_check_feature(<feature>) to check if <feature> is enabled
173 # # Enable the 'blame' blob view, showing the last commit that modified
174 # # each line in the file. This can be very CPU-intensive.
176 # # To enable system wide have in $GITWEB_CONFIG
177 # # $feature{'blame'}{'default'} = [1];
178 # # To have project specific config enable override in $GITWEB_CONFIG
179 # # $feature{'blame'}{'override'} = 1;
180 # # and in project config gitweb.blame = 0|1;
181 # 'blame' => {
182 # 'sub' => \&feature_blame,
183 # 'override' => 0,
184 # 'default' => [0]},
185 $feature{blame}{default}=[1];
187 # # Enable the 'snapshot' link, providing a compressed archive of any
188 # # tree. This can potentially generate high traffic if you have large
189 # # project.
191 # # Value is a list of formats defined in %known_snapshot_formats that
192 # # you wish to offer.
193 # # To disable system wide have in $GITWEB_CONFIG
194 # # $feature{'snapshot'}{'default'} = [];
195 # # To have project specific config enable override in $GITWEB_CONFIG
196 # # $feature{'snapshot'}{'override'} = 1;
197 # # and in project config, a comma-separated list of formats or "none"
198 # # to disable. Example: gitweb.snapshot = tbz2,zip;
199 # 'snapshot' => {
200 # 'sub' => \&feature_snapshot,
201 # 'override' => 0,
202 # 'default' => ['tgz']},
204 # # Enable text search, which will list the commits which match author,
205 # # committer or commit text to a given string. Enabled by default.
206 # # Project specific override is not supported.
207 # 'search' => {
208 # 'override' => 0,
209 # 'default' => [1]},
211 # # Enable grep search, which will list the files in currently selected
212 # # tree containing the given string. Enabled by default. This can be
213 # # potentially CPU-intensive, of course.
215 # # To enable system wide have in $GITWEB_CONFIG
216 # # $feature{'grep'}{'default'} = [1];
217 # # To have project specific config enable override in $GITWEB_CONFIG
218 # # $feature{'grep'}{'override'} = 1;
219 # # and in project config gitweb.grep = 0|1;
220 # 'grep' => {
221 # 'override' => 0,
222 # 'default' => [1]},
224 # # Enable the pickaxe search, which will list the commits that modified
225 # # a given string in a file. This can be practical and quite faster
226 # # alternative to 'blame', but still potentially CPU-intensive.
228 # # To enable system wide have in $GITWEB_CONFIG
229 # # $feature{'pickaxe'}{'default'} = [1];
230 # # To have project specific config enable override in $GITWEB_CONFIG
231 # # $feature{'pickaxe'}{'override'} = 1;
232 # # and in project config gitweb.pickaxe = 0|1;
233 # 'pickaxe' => {
234 # 'sub' => \&feature_pickaxe,
235 # 'override' => 0,
236 # 'default' => [1]},
238 # # Make gitweb use an alternative format of the URLs which can be
239 # # more readable and natural-looking: project name is embedded
240 # # directly in the path and the query string contains other
241 # # auxiliary information. All gitweb installations recognize
242 # # URL in either format; this configures in which formats gitweb
243 # # generates links.
245 # # To enable system wide have in $GITWEB_CONFIG
246 # # $feature{'pathinfo'}{'default'} = [1];
247 # # Project specific override is not supported.
249 # # Note that you will need to change the default location of CSS,
250 # # favicon, logo and possibly other files to an absolute URL. Also,
251 # # if gitweb.cgi serves as your indexfile, you will need to force
252 # # $my_uri to contain the script name in your $GITWEB_CONFIG.
253 # 'pathinfo' => {
254 # 'override' => 0,
255 # 'default' => [0]},
256 $feature{pathinfo}{default}=[1];
258 # # Make gitweb consider projects in project root subdirectories
259 # # to be forks of existing projects. Given project $projname.git,
260 # # projects matching $projname/*.git will not be shown in the main
261 # # projects list, instead a '+' mark will be added to $projname
262 # # there and a 'forks' view will be enabled for the project, listing
263 # # all the forks. If project list is taken from a file, forks have
264 # # to be listed after the main project.
266 # # To enable system wide have in $GITWEB_CONFIG
267 # # $feature{'forks'}{'default'} = [1];
268 # # Project specific override is not supported.
269 # 'forks' => {
270 # 'override' => 0,
271 # 'default' => [0]},
272 $feature{forks}{default}=[1];