Re: [PATCH] git-remote: support remotes with a dot in the name
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 21, 2007, 05:21 UTC
- Message-ID
- <7vwt2ct79x.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20070221050336.26431.46485.stgit@dv.roinet.com>
Pavel Roskin <proski@gnu.org> writes:
Show 6 quoted lines
> Ignore configuration data other that "url" and "fetch" for the remote. > We cannot process it to extract the remote name from it reliably. > Besides, a remote without "url" is currently invalid, so we are not > missing anything. > > Signed-off-by: Pavel Roskin <proski@gnu.org>
I do not think we ever officially "supported" remotes with a dot in their names since $GIT_DIR/remotes/ or $GIT_DIR/branches days.
Show 5 quoted lines
> for (@remotes) {
> - if (/^remote\.([^.]*)\.(\S*)\s+(.*)$/) {
> + if (/^remote\.(\S*)\.(fetch|url)\s+(.*)$/) {
> add_remote_config(\%seen, $1, $2, $3);
> }I do not strongly oppose to allowing it now, but I suspect this is probably less impact:
if (/^remote\.(\S+?)\.([^.\s]+)\s+(.*)$/) {
...
}With this, we disallow whitespaces in remote names, but we leave the door open for supporting variables other than fetch and url by accepting the third token that matches any sequence of non-dot, non-whitespace letters.