git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t5813: avoid creating urls that break on cygwin

From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Date
Nov 9, 2015, 17:49 UTC
Message-ID
<20151109174932.GA14146@spirit>
In-Reply-To
<20151109154501.GA27224@sigill.intra.peff.net>

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>
---

You're right of course. Somehow I remembered that the fake ssh was doing the stripping, but didn't check that when writing the commit message. How about this version?

 t/t5813-proto-disable-ssh.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable-ssh.sh
index ad877d7..a954ead 100755
--- a/t/t5813-proto-disable-ssh.sh
+++ b/t/t5813-proto-disable-ssh.sh
@@ -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
-- 
2.6.3-495-gf0a7f49


-- 
Dennis Kaarsemaker <dennis@kaarsemaker.net>
http://twitter.com/seveas
Previous: Jeff KingNext: Jeff King
Message 14 of 16 in “Bug: t5813 failing on Cygwin”
  1. Adam DinwoodieNov 7, 2015
  2. Jeff KingNov 7, 2015
  3. Adam DinwoodieNov 7, 2015
  4. Dennis KaarsemakerNov 7, 2015
  5. Ramsay JonesNov 7, 2015
  6. Ramsay JonesNov 7, 2015
  7. Dennis KaarsemakerNov 7, 2015
  8. Ramsay JonesNov 8, 2015
  9. Torsten BögershausenNov 8, 2015
  10. Adam DinwoodieNov 7, 2015
  11. Jeff KingNov 8, 2015
  12. t5813: avoid creating urls that break on cygwinDennis Kaarsemaker, Nov 8, 2015
  13. Jeff KingNov 9, 2015
  14. t5813: avoid creating urls that break on cygwinDennis Kaarsemaker, Nov 9, 2015
  15. Jeff KingNov 9, 2015
  16. Ramsay JonesNov 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.