]> Lady’s Gitweb - Gitweb/commit
gitweb: Introduce common system-wide settings for convenience
authorJakub Narebski <redacted>
Sun, 24 Jul 2011 22:29:18 +0000 (00:29 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
commit4cee11f2d7955b6b9e0f899aef066123b2ae46afe46797b82c7ebbf124d8ed96
tree0300694d83ed26be067cd0f847e22d119d52b6e1882c5606b2a376a7183509e9
parentd0a0ccb4d27d63a2fb051d330f0b7be40f79cfac59125cc6bef13cd764bb6656
gitweb: Introduce common system-wide settings for convenience

Because of backward compatibility we cannot change gitweb to always
use /etc/gitweb.conf (i.e. even if gitweb_config.perl exists).  For
common system-wide settings we therefore need separate configuration
file: /etc/gitweb-common.conf.

Long description:

gitweb currently obtains configuration from the following sources:

  1. per-instance configuration file (default: gitweb_conf.perl)
  2. system-wide configuration file (default: /etc/gitweb.conf)

If per-instance configuration file exists, then system-wide
configuration is _not used at all_.  This is quite untypical and
suprising behavior.

Moreover it is different from way git itself treats /etc/git.conf.  It
reads in stuff from /etc/git.conf and then local repos can change or
override things as needed.  In fact this is quite beneficial, because
it gives site admins a simple and easy way to give an automatic hint
to a repo about things the admin would like.

On the other hand changing current behavior may lead to the situation,
where something in /etc/gitweb.conf may interfere with unintended
interaction in the local repository.  One solution would be to
_require_ to do explicit include; with read_config_file() it is now
easy, as described in gitweb/README (description introduced in this
commit).

But as J.H. noticed we cannot ask people to modify their per-instance
gitweb config file to include system-wide settings, nor we can require
them to do this.

Therefore, as proposed by Junio, for gitweb to have centralized config
elements while retaining backwards compatibility, introduce separate
common system-wide configuration file, by default /etc/gitweb-common.conf

Noticed-by: Drew Northup <redacted>
Helped-by: John 'Warthog9' Hawley <redacted>
Inspired-by: Junio C Hamano <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
INSTALL
Makefile
README
gitweb.perl
This page took 0.358845 seconds and 4 git commands to generate.