All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: peff@peff.net
Cc: git@vger.kernel.org, gitster@pobox.com, adam@dinwoodie.org,
	ramsay@ramsayjones.plus.com
Subject: [PATCH] t5813: avoid creating urls that break on cygwin
Date: Mon, 9 Nov 2015 18:49:35 +0100	[thread overview]
Message-ID: <20151109174932.GA14146@spirit> (raw)
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

  reply	other threads:[~2015-11-09 17:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 12:11 Bug: t5813 failing on Cygwin Adam Dinwoodie
2015-11-07 18:45 ` Jeff King
2015-11-07 19:20   ` Adam Dinwoodie
2015-11-07 21:02     ` Dennis Kaarsemaker
2015-11-07 21:21       ` Ramsay Jones
2015-11-07 23:05         ` Ramsay Jones
2015-11-07 23:32           ` Dennis Kaarsemaker
2015-11-08  1:46             ` Ramsay Jones
2015-11-08  7:11             ` Torsten Bögershausen
2015-11-07 23:24       ` Adam Dinwoodie
2015-11-08  5:10       ` Jeff King
2015-11-08  9:54         ` [PATCH] t5813: avoid creating urls that break on cygwin Dennis Kaarsemaker
2015-11-09 15:45           ` Jeff King
2015-11-09 17:49             ` Dennis Kaarsemaker [this message]
2015-11-09 17:50               ` Jeff King
2015-11-08 13:21         ` Bug: t5813 failing on Cygwin Ramsay Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151109174932.GA14146@spirit \
    --to=dennis@kaarsemaker.net \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.