[PATCH] gitweb: make remote_heads config setting work.
- From
- Phil Pennock <phil@apcera.com>
- Date
- Nov 5, 2012, 23:50 UTC
- Message-ID
- <20121105235047.GA78156@redoubt.spodhuis.org>
Git configuration items can not contain underscores in their name; the 'remote_heads' feature can not be enabled on a per-repository basis with that name.
This changes the git-config option to be `gitweb.remoteheads` but does not change the gitweb.conf option, to avoid backwards compatibility issues. We strip underscores from keys before looking through git-config output for them.
Signed-off-by: Phil Pennock <phil@apcera.com>" --- gitweb/gitweb.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 10ed9e5..f2144c8 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -541,7 +541,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, @@ -2702,6 +2702,7 @@ sub git_get_project_config { $key = lc($key); } $key =~ s/^gitweb\.//; + $key =~ s/_//g; return if ($key =~ m/\W/); # type sanity check
-- 1.7.10.3