Re: [PATCH] clone: local URLs are not for ssh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 29, 2013 at 2:37 AM, Torsten Bögershausen <tboegi@xxxxxx> wrote:
> "git clone /foo/bar:baz" or "git clone ../foo/bar:baz"
> are meant to clone from the local file system, and not to clone
> from a remote server over git-over-ssh.

I don't think this is necessary. Commit 6000334 should detect both
cases fine because both have a slash before the first colon.

>
> Signed-off-by: Torsten Bögershausen <tboegi@xxxxxx>
> ---
>  connect.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/connect.c b/connect.c
> index a80ebd3..b382032 100644
> --- a/connect.c
> +++ b/connect.c
> @@ -550,7 +550,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
>                 end = host;
>
>         path = strchr(end, c);
> -       if (path && !has_dos_drive_prefix(end)) {
> +       if (path && !has_dos_drive_prefix(end) &&
> +           url[0] != '/' && url[0] != '.' ) {
>                 if (c == ':') {
>                         if (path < strchrnul(host, '/')) {
>                                 protocol = PROTO_SSH;
> --
> 1.8.4.457.g424cb08
>



-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]