]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5813: avoid creating urls that break on cygwin
authorDennis Kaarsemaker <dennis@kaarsemaker.net>
Mon, 9 Nov 2015 17:49:35 +0000 (18:49 +0100)
committerJeff King <peff@peff.net>
Fri, 20 Nov 2015 11:46:48 +0000 (06:46 -0500)
When passed an ssh:// url, git strips ssh://host from the url but does
not remove leading slashes from the path. So when this test used
ssh://remote//path/to/pwd, the path accessed by our fake SSH is
//path/to/pwd, which cygwin interprets as a UNC path, causing the test
to fail.

We may want to actually fix this in git itself, making it remove extra
slashes from urls before feeding them to transports or helpers, but
that's for another topic as it could cause regressions.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Jeff King <peff@peff.net>
t/t5813-proto-disable-ssh.sh

index ad877d774aad308bc81ecfae6eead262719694b9..a954ead8af882002d3e8bbb6dad8c52190f794c7 100755 (executable)
@@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '
 '
 
 test_proto "host:path" ssh "remote:repo.git"
-test_proto "ssh://" ssh "ssh://remote/$PWD/remote/repo.git"
-test_proto "git+ssh://" ssh "git+ssh://remote/$PWD/remote/repo.git"
+test_proto "ssh://" ssh "ssh://remote$PWD/remote/repo.git"
+test_proto "git+ssh://" ssh "git+ssh://remote$PWD/remote/repo.git"
 
 test_done