From: Junio C Hamano <gitster@pobox•com>
To: "Torsten Bögershausen" <tboegi@web•de>
Cc: git@vger•kernel.org, sunshine@sunshineco•com, peff@peff•net,
pclouds@gmail•com
Subject: Re: [PATCH V2] git clone: is an URL local or ssh
Date: Mon, 28 Oct 2013 13:57:13 -0700 [thread overview]
Message-ID: <xmqqmwltdsgm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <201310282116.21551.tboegi@web.de> ("Torsten Bögershausen"'s message of "Mon, 28 Oct 2013 21:16:19 +0100")
Torsten Bögershausen <tboegi@web•de> writes:
> (This does apply on pu, not on master.
Hmph. At least for me, it applies down to cabb411f (Merge branch
'nd/clone-local-with-colon', 2013-10-14) just fine. Puzzled.
> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
> index 1d1c875..a126f08 100755
> --- a/t/t5601-clone.sh
> +++ b/t/t5601-clone.sh
> @@ -294,39 +294,95 @@ test_expect_success 'setup ssh wrapper' '
> export TRASH_DIRECTORY
> '
>
> -clear_ssh () {
> - >"$TRASH_DIRECTORY/ssh-output"
> -}
> -
> -expect_ssh () {
> +i5601=0
> +# $1 url
> +# $2 none|host
> +# $3 path
> +test_clone_url () {
> + i5601=$(($i5601 + 1))
> + >"$TRASH_DIRECTORY/ssh-output" &&
> + test_might_fail git clone "$1" tmp$i5601 &&
> {
> - case "$1" in
> + case "$2" in
> none)
> ;;
> *)
> - echo "ssh: $1 git-upload-pack '$2'"
> + echo "ssh: $2 git-upload-pack '$3'"
> esac
> } >"$TRASH_DIRECTORY/ssh-expect" &&
This looks like a strange use of {} (not an issue this patch
introduced, though). Shouldn't this suffice?
case ... in
...
esac >"$TRASH_DIRECTORY/ssh-expect"
> + (
> + cd "$TRASH_DIRECTORY" &&
> + test_cmp ssh-expect ssh-output &&
> + rm -rf ssh-expect ssh-output
Drop "r", please, when you know these are supposed to be files.
> + )
> }
>
> +# url looks ssh like, and is on disc: should be local
> test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
> cp -R src "foo:bar" &&
> + test_clone_url "foo:bar" none &&
> + ( cd tmp$i5601 && git log)
Hmph. What is this "git log" about? Leftover from an earlier
debugging session?
The code change to connect.c part seemed to be OK from a cursory
look.
Thanks.
next prev parent reply other threads:[~2013-10-28 20:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 20:16 [PATCH V2] git clone: is an URL local or ssh Torsten Bögershausen
2013-10-28 20:57 ` Junio C Hamano [this message]
2013-10-29 1:49 ` Jeff King
2013-10-29 1:48 ` Jeff King
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=xmqqmwltdsgm.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
--cc=sunshine@sunshineco$(echo .)com \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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