Merge branch 'jn/gitweb-config-list-case'

* jn/gitweb-config-list-case:
  gitweb: Git config keys are case insensitive, make config search too
This commit is contained in:
Junio C Hamano 2011-08-08 12:33:35 -07:00
commit 2728139a62

View File

@ -2526,6 +2526,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/);