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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 20, 2007 at 10:18:55PM -0800, Junio C Hamano wrote:
> 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/*

> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]