Skip to content

Commit 2728139

Browse files
committed
Merge branch 'jn/gitweb-config-list-case'
* jn/gitweb-config-list-case: gitweb: Git config keys are case insensitive, make config search too
2 parents 86c9cd8 + 14569cd commit 2728139

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gitweb/gitweb.perl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,13 @@ sub git_get_project_config {
25262526

25272527
# key sanity check
25282528
return unless ($key);
2529+
# only subsection, if exists, is case sensitive,
2530+
# and not lowercased by 'git config -z -l'
2531+
if (my ($hi, $mi, $lo) = ($key =~ /^([^.]*)\.(.*)\.([^.]*)$/)) {
2532+
$key = join(".", lc($hi), $mi, lc($lo));
2533+
} else {
2534+
$key = lc($key);
2535+
}
25292536
$key =~ s/^gitweb\.//;
25302537
return if ($key =~ m/\W/);
25312538

0 commit comments

Comments
 (0)