X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=connect.c;h=a0783d4867c5e6a9496e11ed043f666a402c5db9;hb=76deaab4e89af726eabacfd58c6678804bc901c1;hp=f57efd06c1d7ab01076b67d37ed24e34e17c4ebb;hpb=69490f345943f6f6d7ae52e0e9c870e8b48a5dea;p=~andy%2Fgit diff --git a/connect.c b/connect.c index f57efd06c..a0783d486 100644 --- a/connect.c +++ b/connect.c @@ -551,8 +551,11 @@ struct child_process *git_connect(int fd[2], const char *url_orig, path = strchr(end, c); if (path && !has_dos_drive_prefix(end)) { if (c == ':') { - protocol = PROTO_SSH; - *path++ = '\0'; + if (path < strchrnul(host, '/')) { + protocol = PROTO_SSH; + *path++ = '\0'; + } else /* '/' in the host part, assume local path */ + path = end; } } else path = end;