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

Re: [PATCH] git-remote: support remotes with a dot in the name

From
Theodore Tso <tytso@mit.edu>
Date
Feb 21, 2007, 10:21 UTC
Message-ID
<20070221102111.GB19825@thunk.org>
In-Reply-To
<7vfy90t4mo.fsf@assigned-by-dhcp.cox.net>
On Tue, Feb 20, 2007 at 10:18:55PM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> Do you mean:
> 
> 	[remote "wireless-2.6.url"]
> 		url = wire.less:/repo/sito/ry.git
>         	fetch = +refs/heads/*:refs/remotes/wireless-2.6.url/*
Or even more likely:
	[remote "stable-2.6.19"]
		url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.19.y.git
		fetch = +refs/heads/*:refs/remotes/stable-2.6.19/*
Show 19 quoted lines
> If so I think my replacement would match it.  It will be
> returned from "git config --get-regexp '^remote\.'"  like this:
> 
> remote.wireless-2.6.url.url wire.less:/repo/sito/ry.git
> remote.wireless-2.6.url.fetch +refs/heads/*:refs/remotes/wireless-2.6.url/*
> 
> and in:
> 
>  	/^remote\.(\S+?)\.([^.\s]+)\s+(.*)$/
> 
> $1 would match shortest non-whitespace sequence after "remote.",
> $2 would match longuest non-dot, non-whitespace sequence before
> a sequence of whitespaces, and
> $3 would match everything after that sequence of whitespaces.
> 
> So, $1 = "wireless-2.6.url", $2 = "url", $3 = "wire.less:/repo/sito/ry.git"
> or $1 = "wireless-2.6.url", $2 = "fetch", $3 = "+refs/heads/...."
> 
> But my Perl is rusty, so please double check it.
Yep, looks good to me.
						- Ted
Previous: Junio C Hamano
Message 8 of 8 in “git-remote: support remotes with a dot in the name”
  1. git-remote: support remotes with a dot in the namePavel Roskin, Feb 21, 2007
  2. Junio C HamanoFeb 21, 2007
  3. Pavel RoskinFeb 21, 2007
  4. Junio C HamanoFeb 21, 2007
  5. Pavel RoskinFeb 21, 2007
  6. Shawn O. PearceFeb 21, 2007
  7. Junio C HamanoFeb 21, 2007
  8. Theodore TsoFeb 21, 2007

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.