summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-08-08 12:33:35 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-08-08 12:33:35 -0700
commit2728139a627dced09d47ec6927d4e8cf1dddc7d6 (patch)
treeb1c8204ab46becc191dd441f7b8ba8a9719e82d6
parentMerge branch 'jl/submodule-update-quiet' (diff)
parentgitweb: Git config keys are case insensitive, make config search too (diff)
downloadtgif-2728139a627dced09d47ec6927d4e8cf1dddc7d6.tar.xz
Merge branch 'jn/gitweb-config-list-case'
* jn/gitweb-config-list-case: gitweb: Git config keys are case insensitive, make config search too
-rwxr-xr-xgitweb/gitweb.perl7
1 files changed, 7 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c7ce038274..70a576a626 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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/);