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

Re: [PATCH] gitweb: make remote_heads config setting work.

From
Jeff King <peff@peff.net>
Date
Nov 9, 2012, 16:37 UTC
Message-ID
<20121109163710.GD19725@sigill.intra.peff.net>
In-Reply-To
<7vk3tvqthw.fsf@alter.siamese.dyndns.org>
On Thu, Nov 08, 2012 at 08:40:11PM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> Looking at the code before this part:
> 
> 	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/);
> 
> the new code is munding the $hi and $mi parts, while the mistaken
> configuration this patch is trying to correct is about the $lo part,
> and possibly the $hi part, but never the $mi part.

Good catch. I think the "return" in the existing code suffers from the same problem: it will bail on non-word characters in the $mi part, but that part should allow arbitrary characters.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 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.