gitweb: warn if feature cannot be overridden.
authorMartin Waitz <tali@admingilde.org>
Tue, 3 Oct 2006 18:07:43 +0000 (20:07 +0200)
committerJunio C Hamano <junkio@cox.net>
Thu, 5 Oct 2006 06:02:31 +0000 (23:02 -0700)
If the administrator configures pathinfo to be overrideable by the
local repository a warning is shown.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index 10e803a97fa411ad014fbe476e55ec83d2e9f6b6..0ff6f7c1e4c1f7bd7f9df42eb53c2efb8cb21759 100755 (executable)
@@ -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);
 }