From: Eric Sunshine Date: Mon, 13 May 2013 04:48:42 GMT Subject: Re: [PATCHv2 04/10] remote: Reject remote names containing '/' Message-ID: In-Reply-To: <1368289280-30337-5-git-send-email-johan@herland.net> On Sat, May 11, 2013 at 12:21 PM, Johan Herland wrote: > Although we definitely support and encourage use of multi-level branch > names, we have never conciously tried to give support for multi-level s/conciously/consciously/ > remote names. Currently, they are allowed, but there is no evidence that > they are commonly used. > > Now, they do provide a source of problems when trying to expand the > "$nick/$name" shorthand notation (where $nick matches a remote name) > into a full refname. Consider the shorthand "foo/bar/baz": Does this > parse as $nick = foo, $name = bar/baz, or $nick = foo/bar, $name = baz? > > Since we need to be unambiguous about these things, we hereby declare > that a remote name shall never contain a '/' character, and that the > only correct way to parse "foo/bar/baz" is $nick = foo, $name = bar/baz. > > This patch teaches 'git remote' to reject remote names with slashes, > and adds tests verifying this. > > Signed-off-by: Johan Herland