Re: [PATCH] clone: local URLs are not for ssh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
 '




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]