Windows: Disambiguate DOS style paths from SSH URLs.

If on Windows a path is specified as C:/path, then this is also a valid
SSH URL. To disambiguate between the two interpretations we take an URL
that looks like a path with a drive letter as a local URL.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2007-11-30 22:51:10 +01:00
parent 6ed807f843
commit be501813d2
2 changed files with 3 additions and 2 deletions

View File

@ -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';