Merge branch 'gp/gitweb'

* gp/gitweb:
  gitweb: fallback to system-wide config file (fixup)
  gitweb: fallback to system-wide config file if default config does not exist
This commit is contained in:
Junio C Hamano
2008-04-09 00:44:48 -07:00
4 changed files with 21 additions and 3 deletions

View File

@ -369,7 +369,12 @@ sub filter_snapshot_fmts {
}
our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
if (-e $GITWEB_CONFIG) {
do $GITWEB_CONFIG;
} else {
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
do $GITWEB_CONFIG_SYSTEM if -e $GITWEB_CONFIG_SYSTEM;
}
# version of the core git binary
our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";