From 4b5dc988c0db1e7ce5ba41c09a1e75cbc71c3f35 Mon Sep 17 00:00:00 2001 From: Dennis Stosberg Date: Tue, 29 Aug 2006 09:19:02 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 68f40bda8f..7922c3ce54 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -152,7 +152,7 @@ sub feature_snapshot { our @diff_opts = ('-M'); # taken from git_commit 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 our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown"; -- 2.11.4.GIT