use do() instead of require() to include configuration

When run under mod_perl, require() will read and execute the configuration
file on the first invocation only.  On every subsequent invocation, all
configuration variables will be reset to their default values.  do() reads
and executes the configuration file unconditionally.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Dennis Stosberg 2006-08-29 09:19:02 +02:00 committed by Junio C Hamano
parent 3a36bc8469
commit 4b5dc988c0

View File

@ -152,7 +152,7 @@ sub feature_snapshot {
our @diff_opts = ('-M'); # taken from git_commit our @diff_opts = ('-M'); # taken from git_commit
our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++"; our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
require $GITWEB_CONFIG if -e $GITWEB_CONFIG; do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
# version of the core git binary # version of the core git binary
our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown"; our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";