]> git.ipfire.org Git - thirdparty/git.git/blobdiff - connect.c
Merge branch 'nd/clone-local-with-colon'
[thirdparty/git.git] / connect.c
index a80ebd316c34bb0f0cf3d5a04c33123bb2847421..40868610ab1c02d10cc7cdc927fdf97a5e010414 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -552,7 +552,7 @@ 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 == ':') {
-                       if (path < strchrnul(host, '/')) {
+                       if (host != url || path < strchrnul(host, '/')) {
                                protocol = PROTO_SSH;
                                *path++ = '\0';
                        } else /* '/' in the host part, assume local path */