Work around MinGW mangling of "host:/path"

The common way to specify an ssh remote is to say "host:/path",
but MinGW decides for us that this is probably a path list, and
path lists are separated by a semicolon on Windows.  So before
passing this to git-peek-remote.exe, it transforms that to
"host;C:/msysGit/path".  Avoid that by expanding it to
"ssh://host/path", but take extra care not to convert absolute
paths to that syntax!

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2007-08-06 16:49:51 +01:00
parent 13e3374314
commit 60096146d6

3
git-parse-remote.sh Executable file → Normal file
View File

@@ -51,7 +51,8 @@ get_remote_url () {
;;
*)
die "internal error: get-remote-url $1" ;;
esac
esac | sed "s|^\(.[^:][^:]*\):\(/[^/]\)|ssh://\1\2|"
# work around MinGW path mangling
}
get_default_remote () {