summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2013-10-14 11:06:57 -0700
committerJonathan Nieder <jrnieder@gmail.com>2013-10-14 11:06:57 -0700
commitcabb411fcf6a0a0f5058f2fee0f628e9a16a6fcb (patch)
tree765637b99a2226314e7680126e97daf766c7f1ba /connect.c
parent13f17f338c7edfdd60dc152c82f6393a3c4bc381 (diff)
parent8d3d28f5dba94a15a79975e4adc909c295c80d80 (diff)
downloadgit-cabb411fcf6a0a0f5058f2fee0f628e9a16a6fcb.tar.gz
Merge branch 'nd/clone-local-with-colon'
* nd/clone-local-with-colon: clone: tighten "local paths with colons" check a bit
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index a80ebd316c..40868610ab 100644
--- 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 */