From: Junio C Hamano Date: Wed, 21 Feb 2007 05:21:46 GMT Subject: Re: [PATCH] git-remote: support remotes with a dot in the name Message-ID: <7vwt2ct79x.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070221050336.26431.46485.stgit@dv.roinet.com> Pavel Roskin writes: > 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 I do not think we ever officially "supported" remotes with a dot in their names since $GIT_DIR/remotes/ or $GIT_DIR/branches days. > 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.