diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-09 00:44:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-09 00:44:48 -0700 |
commit | 018465d998a02376ba62e2de3ac707bc98322141 (patch) | |
tree | abac78775aa4fa54a892da0ce3930ae1196da5f2 /gitweb/gitweb.perl | |
parent | 3c993de9f25d052b791c55609468c59bcd47fc19 (diff) | |
parent | 26ffcb7690139dd53f5deb4f875895f22bebee4f (diff) | |
download | git-018465d998a02376ba62e2de3ac707bc98322141.tar.gz |
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
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 73d098a433..e69d7fd07b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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"; |