[RFD] gitweb configuration
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:42:30
Petr Baudis [off-list ref] writes:
- we might want to have a configuration mechanism in place before enhancing gitweb. My gut feeling is that we can use [gitweb] section in project.git/config (and probably duplicate first and deprecate later existing "description" as well).
The problem is we have different types of configuration in gitweb, and we
should take care where to put appropriate configuration options/variables.
- build time options, like $gitexecdir ($gitbin now) or $gitweb_version
($version now) which could be set at build time a la ./configure i.e
my $gitexecdir = "@GIT_EXEC_DIR@"; or something like that.
- gitweb installation options (gitweb version need not to correspond to
git version, and we could theoretically have more than one gitweb
installation while one git-core installation). It was proposed to put
such options on gitweb.conf file in the same directory as gitweb.cgi.
Unfortunately if one would want to use git-repo-config for managing
gitweb.conf one is out of luck: git-repo-config uses $GIT_DIR/config.
Among installation options we could put also defaults for repository-wide
(repository specific) options.
Global gitweb options include:
* $projectroot - absolute fs-path which will be prepended to the
project path, i.e. where projects to display are located (dir)
* $projects_list - source of projects list (file)
* $home_text - html text to include at home page (file)
* $stylesheet - default gitweb stylesheet (file)
* $git_temp - where to place temporary files (dir)
- repository specific options, of which gitweb for now uses only
$GIT_DIR/description, and which could use repository configuration,
[gitweb] section.
Repository specific options [can] include:
* description - One line description of repository;
theoretical problem: HTML escaping.
* blame - to make 'blame'/'annotate' interface available.
* blobmimemapfile - for repository specific mime map for blob_plain.
* favicon - if default favicon is not used.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git