Re: [PATCHv2 04/10] remote: Reject remote names containing '/'
On Sat, May 11, 2013 at 12:21 PM, Johan Herland <johan@herland.net> 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/
Show 16 quoted lines
> 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 <johan@herland.net>