glossary: mention 'treeish' as an alternative to 'tree-ish'
[gitweb.git] / connect.c
index f57efd06c1d7ab01076b67d37ed24e34e17c4ebb..a0783d4867c5e6a9496e11ed043f666a402c5db9 100644 (file)
--- 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;