mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
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:
commit
2728139a62
@ -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/);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user