Re: [PATCH] git-remote: support remotes with a dot in the name
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