From 14569cd810ad35a66ca7867505e0b2dd202ab95f Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Thu, 28 Jul 2011 23:38:03 +0200 Subject: gitweb: Git config keys are case insensitive, make config search too "git config -z -l" that gitweb uses in git_parse_project_config() to populate %config hash returns section and key names of config variables in lowercase (they are case insensitive). When checking %config in git_get_project_config() we have to take it into account. Helped-by: Junio C Hamano Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 81dacf2b6..73492771d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2510,6 +2510,13 @@ sub git_get_project_config { # key sanity check return unless ($key); + # only subsection, if exists, is case sensitive, + # and not lowercased by 'git config -z -l' + if (my ($hi, $mi, $lo) = ($key =~ /^([^.]*)\.(.*)\.([^.]*)$/)) { + $key = join(".", lc($hi), $mi, lc($lo)); + } else { + $key = lc($key); + } $key =~ s/^gitweb\.//; return if ($key =~ m/\W/); -- cgit v1.2.1