From 60096146d67d408837b80c6b720bee722f35cf72 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 6 Aug 2007 16:49:51 +0100 Subject: [PATCH] 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 --- git-parse-remote.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 git-parse-remote.sh diff --git a/git-parse-remote.sh b/git-parse-remote.sh old mode 100755 new mode 100644 index 695a4094bb..7c0d242eec --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -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 () {