summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connect.c2
-rw-r--r--transport.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/connect.c b/connect.c
index e92af29..574f42f 100644
--- a/connect.c
+++ b/connect.c
@@ -529,7 +529,7 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
end = host;
path = strchr(end, c);
- if (path) {
+ if (path && !has_dos_drive_prefix(end)) {
if (c == ':') {
protocol = PROTO_SSH;
*path++ = '\0';
diff --git a/transport.c b/transport.c
index 3ff8519..4145eed 100644
--- a/transport.c
+++ b/transport.c
@@ -709,7 +709,8 @@ static int is_local(const char *url)
{
const char *colon = strchr(url, ':');
const char *slash = strchr(url, '/');
- return !colon || (slash && slash < colon);
+ return !colon || (slash && slash < colon) ||
+ has_dos_drive_prefix(url);
}
static int is_file(const char *url)