gitweb_config: Fix graphiclog link
[girocco.git] / gitweb / gitweb_config.perl
blob87c83c51780c03ff592ee7bd8c8103c497c91f1d
1 # Pull Girocco config
2 use lib ".";
3 use Girocco::Config;
5 # Base web path
6 our $my_uri = $Girocco::Config::gitweburl;
8 ## core git executable to use
9 ## this can just be "git" if your webserver has a sensible PATH
10 our $GIT = $Girocco::Config::git_bin;
12 ## absolute fs-path which will be prepended to the project path
13 our $projectroot = $Girocco::Config::reporoot;
15 ## fs traversing limit for getting project list
16 ## the number is relative to the projectroot
17 #our $project_maxdepth = "2007";
19 ## target of the home link on top of all pages
20 our $home_link = $Girocco::Config::gitweburl;
22 ## string of the home link on top of all pages
23 our $home_link_str = $Girocco::Config::name;
25 ## name of your site or organization to appear in page titles
26 ## replace this with something more descriptive for clearer bookmarks
27 our $site_name = $Girocco::Config::title;
28 ## filename of html text to include at top of each page
29 #our $site_header = "";
30 ## html text to include at home page
31 our $home_text = "$Girocco::Config::webroot/indextext.html";
32 ## filename of html text to include at bottom of each page
33 #our $site_footer = "";
35 ## URI of stylesheets
36 our @stylesheets = ("$Girocco::Config::gitwebfiles/gitweb.css");
37 ## URI of a single stylesheet, which can be overridden in GITWEB_CONFIG.
38 #our $stylesheet = undef;
39 ## URI of GIT logo (72x27 size)
40 our $logo = "$Girocco::Config::gitwebfiles/git-logo.png";
41 ## URI of GIT favicon, assumed to be image/png type
42 our $favicon = "$Girocco::Config::gitwebfiles/git-favicon.png";
43 ## URI of blame.js
44 our $blamejs = "$Girocco::Config::gitwebfiles/blame.js";
45 ## URI of gitweb.js
46 our $gitwebjs = "$Girocco::Config::gitwebfiles/gitweb.js";
48 ## URI and label (title) of GIT logo link
49 ##our $logo_url = "http://www.kernel.org/pub/software/scm/git/docs/";
50 ##our $logo_label = "git documentation";
51 #our $logo_url = "http://git.or.cz/";
52 #our $logo_label = "git homepage";
54 ## source of projects list
55 #our $projects_list = "";
57 ## the width (in characters) of the projects list "Description" column
58 #our $projects_list_description_width = 25;
60 ## default order of projects list
61 ## valid values are none, project, descr, owner, and age
62 #our $default_projects_order = "project";
64 ## show repository only if this file exists
65 ## (only effective if this variable evaluates to true)
66 #our $export_ok = "";
68 ## only allow viewing of repositories also shown on the overview page
69 #our $strict_export = "";
71 ## list of git base URLs used for URL to where fetch project from,
72 ## i.e. full URL is "$git_base_url/$project"
73 our @git_base_url_list = ();
74 $Girocco::Config::gitpullurl and push @git_base_url_list, $Girocco::Config::gitpullurl;
75 $Girocco::Config::httppullurl and push @git_base_url_list, $Girocco::Config::httppullurl;
77 our $git_push_url = $Girocco::Config::pushurl;
79 ## default blob_plain mimetype and default charset for text/plain blob
80 #our $default_blob_plain_mimetype = 'text/plain';
81 #our $default_text_plain_charset = undef;
83 ## file to use for guessing MIME types before trying /etc/mime.types
84 ## (relative to the current git repository)
85 #our $mimetypes_file = undef;
87 ## assume this charset if line contains non-UTF-8 characters;
88 ## it should be valid encoding (see Encoding::Supported(3pm) for list),
89 ## for which encoding all byte sequences are valid, for example
90 ## 'iso-8859-1' aka 'latin1' (it is decoded without checking, so it
91 ## could be even 'utf-8' for the old behavior)
92 #our $fallback_encoding = 'latin1';
94 ## rename detection options for git-diff and git-diff-tree
95 ## - default is '-M', with the cost proportional to
96 ## (number of removed files) * (number of new files).
97 ## - more costly is '-C' (which implies '-M'), with the cost proportional to
98 ## (number of changed files + number of removed files) * (number of new files)
99 ## - even more costly is '-C', '--find-copies-harder' with cost
100 ## (number of files in the original tree) * (number of new files)
101 ## - one might want to include '-B' option, e.g. '-B', '-M'
102 #our @diff_opts = ('-M'); # taken from git_commit
104 ## projects list cache for busy sites with many projects;
105 ## if you set this to non-zero, it will be used as the cached
106 ## index lifetime in minutes
108 ## the cached list version is stored in $cache_dir/$cache_name and can
109 ## be tweaked by other scripts running with the same uid as gitweb -
110 ## use this ONLY at secure installations; only single gitweb project
111 ## root per system is supported, unless you tweak configuration!
112 #our $projlist_cache_lifetime = 0; # in minutes
113 our $projlist_cache_lifetime = 10;
114 ## FHS compliant $cache_dir would be "/var/cache/gitweb"
115 #our $cache_dir =
116 # (defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : '/tmp').'/gitweb';
117 #our $projlist_cache_name = 'gitweb.index.cache';
119 ## information about snapshot formats that gitweb is capable of serving
120 #our %known_snapshot_formats = (
121 # # name => {
122 # # 'display' => display name,
123 # # 'type' => mime type,
124 # # 'suffix' => filename suffix,
125 # # 'format' => --format for git-archive,
126 # # 'compressor' => [compressor command and arguments]
127 # # (array reference, optional)}
129 # 'tgz' => {
130 # 'display' => 'tar.gz',
131 # 'type' => 'application/x-gzip',
132 # 'suffix' => '.tar.gz',
133 # 'format' => 'tar',
134 # 'compressor' => ['gzip']},
136 # 'tbz2' => {
137 # 'display' => 'tar.bz2',
138 # 'type' => 'application/x-bzip2',
139 # 'suffix' => '.tar.bz2',
140 # 'format' => 'tar',
141 # 'compressor' => ['bzip2']},
143 # 'zip' => {
144 # 'display' => 'zip',
145 # 'type' => 'application/x-zip',
146 # 'suffix' => '.zip',
147 # 'format' => 'zip'},
150 ## Aliases so we understand old gitweb.snapshot values in repository
151 ## configuration.
152 #our %known_snapshot_format_aliases = (
153 # 'gzip' => 'tgz',
154 # 'bzip2' => 'tbz2',
156 # # backward compatibility: legacy gitweb config support
157 # 'x-gzip' => undef, 'gz' => undef,
158 # 'x-bzip2' => undef, 'bz2' => undef,
159 # 'x-zip' => undef, '' => undef,
162 ## You define site-wide feature defaults here; override them with
163 ## $GITWEB_CONFIG as necessary.
164 #our %feature = (
165 # # feature => {
166 # # 'sub' => feature-sub (subroutine),
167 # # 'override' => allow-override (boolean),
168 # # 'default' => [ default options...] (array reference)}
170 # # if feature is overridable (it means that allow-override has true value),
171 # # then feature-sub will be called with default options as parameters;
172 # # return value of feature-sub indicates if to enable specified feature
174 # # if there is no 'sub' key (no feature-sub), then feature cannot be
175 # # overriden
177 # # use gitweb_check_feature(<feature>) to check if <feature> is enabled
179 # # Enable the 'blame' blob view, showing the last commit that modified
180 # # each line in the file. This can be very CPU-intensive.
182 # # To enable system wide have in $GITWEB_CONFIG
183 # # $feature{'blame'}{'default'} = [1];
184 # # To have project specific config enable override in $GITWEB_CONFIG
185 # # $feature{'blame'}{'override'} = 1;
186 # # and in project config gitweb.blame = 0|1;
187 # 'blame' => {
188 # 'sub' => \&feature_blame,
189 # 'override' => 0,
190 # 'default' => [0]},
191 $feature{blame}{default}=[1];
193 # # Enable the 'snapshot' link, providing a compressed archive of any
194 # # tree. This can potentially generate high traffic if you have large
195 # # project.
197 # # Value is a list of formats defined in %known_snapshot_formats that
198 # # you wish to offer.
199 # # To disable system wide have in $GITWEB_CONFIG
200 # # $feature{'snapshot'}{'default'} = [];
201 # # To have project specific config enable override in $GITWEB_CONFIG
202 # # $feature{'snapshot'}{'override'} = 1;
203 # # and in project config, a comma-separated list of formats or "none"
204 # # to disable. Example: gitweb.snapshot = tbz2,zip;
205 # 'snapshot' => {
206 # 'sub' => \&feature_snapshot,
207 # 'override' => 0,
208 # 'default' => ['tgz']},
209 $feature{'snapshot'}{'default'} = ['tgz', 'zip'];
211 # # Enable text search, which will list the commits which match author,
212 # # committer or commit text to a given string. Enabled by default.
213 # # Project specific override is not supported.
214 # 'search' => {
215 # 'override' => 0,
216 # 'default' => [1]},
218 # # Enable grep search, which will list the files in currently selected
219 # # tree containing the given string. Enabled by default. This can be
220 # # potentially CPU-intensive, of course.
222 # # To enable system wide have in $GITWEB_CONFIG
223 # # $feature{'grep'}{'default'} = [1];
224 # # To have project specific config enable override in $GITWEB_CONFIG
225 # # $feature{'grep'}{'override'} = 1;
226 # # and in project config gitweb.grep = 0|1;
227 # 'grep' => {
228 # 'override' => 0,
229 # 'default' => [1]},
231 # # Enable the pickaxe search, which will list the commits that modified
232 # # a given string in a file. This can be practical and quite faster
233 # # alternative to 'blame', but still potentially CPU-intensive.
235 # # To enable system wide have in $GITWEB_CONFIG
236 # # $feature{'pickaxe'}{'default'} = [1];
237 # # To have project specific config enable override in $GITWEB_CONFIG
238 # # $feature{'pickaxe'}{'override'} = 1;
239 # # and in project config gitweb.pickaxe = 0|1;
240 # 'pickaxe' => {
241 # 'sub' => \&feature_pickaxe,
242 # 'override' => 0,
243 # 'default' => [1]},
245 # # Make gitweb use an alternative format of the URLs which can be
246 # # more readable and natural-looking: project name is embedded
247 # # directly in the path and the query string contains other
248 # # auxiliary information. All gitweb installations recognize
249 # # URL in either format; this configures in which formats gitweb
250 # # generates links.
252 # # To enable system wide have in $GITWEB_CONFIG
253 # # $feature{'pathinfo'}{'default'} = [1];
254 # # Project specific override is not supported.
256 # # Note that you will need to change the default location of CSS,
257 # # favicon, logo and possibly other files to an absolute URL. Also,
258 # # if gitweb.cgi serves as your indexfile, you will need to force
259 # # $my_uri to contain the script name in your $GITWEB_CONFIG.
260 # 'pathinfo' => {
261 # 'override' => 0,
262 # 'default' => [0]},
263 $feature{pathinfo}{default}=[1];
265 # # Make gitweb consider projects in project root subdirectories
266 # # to be forks of existing projects. Given project $projname.git,
267 # # projects matching $projname/*.git will not be shown in the main
268 # # projects list, instead a '+' mark will be added to $projname
269 # # there and a 'forks' view will be enabled for the project, listing
270 # # all the forks. If project list is taken from a file, forks have
271 # # to be listed after the main project.
273 # # To enable system wide have in $GITWEB_CONFIG
274 # # $feature{'forks'}{'default'} = [1];
275 # # Project specific override is not supported.
276 # 'forks' => {
277 # 'override' => 0,
278 # 'default' => [0]},
279 $feature{forks}{default}=[1];
281 # # Insert custom links to the action bar of all project pages.
282 # # This enables you mainly to link to third-party scripts integrating
283 # # into gitweb; e.g. git-browser for graphical history representation
284 # # or custom web-based repository administration interface.
286 # # The 'default' value consists of a list of triplets in the form
287 # # (label, link, position) where position is the label after which
288 # # to inster the link and link is a format string where %n expands
289 # # to the project name, %f to the project path within the filesystem,
290 # # %h to the current hash (h gitweb parameter) and %b to the current
291 # # hash base (hb gitweb parameter).
293 # # To enable system wide have in $GITWEB_CONFIG e.g.
294 # # $feature{'actions'}{'default'} = [('graphiclog',
295 # # '/git-browser/by-commit.html?r=%n', 'summary')];
296 # # Project specific override is not supported.
297 # 'actions' => {
298 # 'override' => 0,
299 # 'default' => []},
300 $feature{actions}{default}=[
301 ('graphiclog', "$Girocco::Config::gitwebfiles/git-browser/by-commit.html?r=%n", 'log'),
302 ('edit', "$Girocco::Config::webadmurl/editproj.cgi?name=%n", 'tree'),
303 ('fork', "$Girocco::Config::webadmurl/regproj.cgi?fork=%n", 'edit')
306 # # Allow gitweb scan project content tags described in ctags/
307 # # of project repository, and display the popular Web 2.0-ish
308 # # "tag cloud" near the project list. Note that this is something
309 # # COMPLETELY different from the normal Git tags.
311 # # gitweb by itself can show existing tags, but it does not handle
312 # # tagging itself; you need an external application for that.
313 # # For an example script, check Girocco's cgi/tagproj.cgi.
315 # # To enable system wide have in $GITWEB_CONFIG
316 # # $feature{'ctags'}{'default'} = ['path_to_tag_script'];
317 # # Project specific override is not supported.
318 # 'ctags' => {
319 # 'override' => 0,
320 # 'default' => [0]},
321 $feature{ctags}{default}=["$Girocco::Config::webadmurl/tagproj.cgi"];