summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-08 12:33:35 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-08 12:33:35 -0700
commit2728139a627dced09d47ec6927d4e8cf1dddc7d6 (patch)
treeb1c8204ab46becc191dd441f7b8ba8a9719e82d6 /gitweb
parent86c9cd8d256919b90c63167bac05e0802f52a244 (diff)
parent14569cd810ad35a66ca7867505e0b2dd202ab95f (diff)
downloadgit-2728139a627dced09d47ec6927d4e8cf1dddc7d6.tar.gz
Merge branch 'jn/gitweb-config-list-case'
* jn/gitweb-config-list-case: gitweb: Git config keys are case insensitive, make config search too
Diffstat (limited to 'gitweb')
-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/);