git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: make remote_heads config setting work.

From
PPPhil 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
Next: Jeff King
Message 1 of 6 in “gitweb: make remote_heads config setting work.”
  1. gitweb: make remote_heads config setting work.Phil Pennock, Nov 5, 2012
  2. Jeff KingNov 8, 2012
  3. Junio C HamanoNov 9, 2012
  4. Jeff KingNov 9, 2012
  5. Re* [PATCH] gitweb: make remote_heads config setting work.Junio C Hamano, Nov 20, 2012
  6. Jeff KingNov 21, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.