git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Jeff King <peff@peff.net>, Duy Nguyen <pclouds@gmail.com>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH] clone: local URLs are not for ssh
Date: Sat, 05 Oct 2013 21:48:37 +0200	[thread overview]
Message-ID: <52506D15.9040206@web.de> (raw)
In-Reply-To: <20131003013127.GA7917@sigill.intra.peff.net>

On 2013-10-03 03.31, Jeff King wrote:
> On Thu, Oct 03, 2013 at 08:01:23AM +0700, Nguyen Thai Ngoc Duy wrote:
> 
>>> Sorry for the noise, I noticed it when I was trying to construct test cases.
>>>
>>> What do we think about adding this at the end of t5505:
>>
>> As usual more tests are usually better. But is t5505-remote.sh the
>> best place? That file seems about "git remote"..
> 
> Yeah, agreed. How about at the end of t5601, after the ssh wrapper I set
> up here:
> 
>   http://article.gmane.org/gmane.comp.version-control.git/235473

Thanks for the review & pointer.
To get it working, a little tweak was needed here, please see below.

diff --git a/t/t5602-clone-remote-exec.sh b/t/t5602-clone-remote-exec.sh
index d232e94..37464aa 100755
--- a/t/t5602-clone-remote-exec.sh
+++ b/t/t5602-clone-remote-exec.sh
@@ -62,21 +62,20 @@ expect_ssh () {
 
 test_expect_success 'cloning myhost:src uses ssh' '
        clear_ssh &&
-       git clone myhost:src ssh-clone &&
+       ! git clone myhost:src ssh-clone &&
        expect_ssh myhost src
 '
 
-test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
+test_expect_success SYMLINKS,NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
        clear_ssh &&
-       cp -R src "foo:bar" &&
-       git clone "./foo:bar" foobar
-       git clone "./foo:bar" foobar &&
+       ln -s src "foo:bar" &&
+       ! git clone "./foo:bar" foobar &&
        expect_ssh none
 '
 
 test_expect_success 'bracketed hostnames are still ssh' '
        clear_ssh &&
-       git clone "[myhost:123]:src" ssh-bracket-clone &&
+       ! git clone "[myhost:123]:src" ssh-bracket-clone &&
        expect_ssh myhost:123 src
 '

  reply	other threads:[~2013-10-05 19:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 19:37 [PATCH] clone: local URLs are not for ssh Torsten Bögershausen
2013-09-29  0:33 ` Duy Nguyen
2013-10-02 18:40   ` Torsten Bögershausen
2013-10-03  1:01     ` Duy Nguyen
2013-10-03  1:31       ` Jeff King
2013-10-05 19:48         ` Torsten Bögershausen [this message]
2013-10-05 20:35           ` Matthieu Moy
2013-10-13 20:00           ` Torsten Bögershausen
2013-10-15  0:12             ` Jeff King
2013-10-15  7:22               ` Torsten Bögershausen

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=52506D15.9040206@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).