Skip to content

Commit

Permalink
Merge branch 'jn/gitweb-config-list-case'
Browse files Browse the repository at this point in the history
* jn/gitweb-config-list-case:
  gitweb: Git config keys are case insensitive, make config search too
  • Loading branch information
Junio C Hamano committed Aug 8, 2011
2 parents 86c9cd8 + 14569cd commit 2728139
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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/);

Expand Down

0 comments on commit 2728139

Please sign in to comment.