summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-29 12:52:16 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-29 12:52:17 -0800
commit36ea7cea13ad57ee48b1616dd29f508f473ec604 (patch)
tree58ae5a0df2fd308784ffd819a02c70b436d99997 /gitweb
parent1cab289026272790b447b2ce80d574df1430e4a4 (diff)
parentaf507944a22a3dabe2041fe629b2178abb5c642f (diff)
downloadgit-36ea7cea13ad57ee48b1616dd29f508f473ec604.tar.gz
Merge branch 'pp/gitweb-config-underscore'
The key "gitweb.remote_heads" is not legal git config; this maps it to "gitweb.remoteheads". * pp/gitweb-config-underscore: gitweb: make remote_heads config setting work
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e8812fa2b9..0f207f2e20 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -540,7 +540,7 @@ our %feature = (
# $feature{'remote_heads'}{'default'} = [1];
# To have project specific config enable override in $GITWEB_CONFIG
# $feature{'remote_heads'}{'override'} = 1;
- # and in project config gitweb.remote_heads = 0|1;
+ # and in project config gitweb.remoteheads = 0|1;
'remote_heads' => {
'sub' => sub { feature_bool('remote_heads', @_) },
'override' => 0,
@@ -2696,12 +2696,15 @@ sub git_get_project_config {
# only subsection, if exists, is case sensitive,
# and not lowercased by 'git config -z -l'
if (my ($hi, $mi, $lo) = ($key =~ /^([^.]*)\.(.*)\.([^.]*)$/)) {
+ $lo =~ s/_//g;
$key = join(".", lc($hi), $mi, lc($lo));
+ return if ($lo =~ /\W/ || $hi =~ /\W/);
} else {
$key = lc($key);
+ $key =~ s/_//g;
+ return if ($key =~ /\W/);
}
$key =~ s/^gitweb\.//;
- return if ($key =~ m/\W/);
# type sanity check
if (defined $type) {