git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: make remote_heads config setting work.
@ 2012-11-05 23:50 Phil Pennock
  2012-11-08 16:56 ` Jeff King
  2012-11-09  4:40 ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Phil Pennock @ 2012-11-05 23:50 UTC (permalink / raw)
  To: git, gitster

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-21 19:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 23:50 [PATCH] gitweb: make remote_heads config setting work Phil Pennock
2012-11-08 16:56 ` Jeff King
2012-11-09  4:40 ` Junio C Hamano
2012-11-09 16:37   ` Jeff King
2012-11-20 22:21     ` Re* " Junio C Hamano
2012-11-21 19:31       ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).