Subject: [PATCH] gitweb: warn if feature cannot be overridden.

From: Martin Waitz <[email-masked]>
Date: Tue, 3 Oct 2006 20:07:43 +0200

If the administrator configures pathinfo to be overrideable by the
local repository a warning is shown.

Signed-off-by: Martin Waitz <[email-masked]>
---
 gitweb/gitweb.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 10e803a..0ff6f7c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -116,6 +116,10 @@ sub gitweb_check_feature {
 		$feature{$name}{'override'},
 		@{$feature{$name}{'default'}});
 	if (!$override) { return @defaults; }
+	if (!defined $sub) {
+		warn "feature $name is not overrideable";
+		return @defaults;
+	}
 	return $sub->(@defaults);
 }
 
-- 
1.4.2.3

-- 
Martin Waitz