Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jn/gitweb-config-list-case'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 8 Aug 2011 19:33:35 +0000
(12:33 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 8 Aug 2011 19:33:35 +0000
(12:33 -0700)
* jn/gitweb-config-list-case:
gitweb: Git config keys are case insensitive, make config search too
gitweb/gitweb.perl
patch
|
blob
|
history
raw
(from parent 1:
86c9cd8
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index c7ce038274a7e7a2eb51044df2be39557a77b2a8..70a576a626ac67516af7b980c64ec33da6b7c19b 100755
(executable)
--- 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/);