git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: 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: Wed, 2 Oct 2013 21:31:27 -0400	[thread overview]
Message-ID: <20131003013127.GA7917@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8DjPiwpMvLe2p+dGBdpU6iTg2my7tddBsQwLnHiHdG8wQ@mail.gmail.com>

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

I don't know of Jonathan squashed those in to your commit...neither is
in his 'pu' yet.

> > test_expect_success 'fetch fail [noexistinghost0:2223]:blink.git' '
> >         (
> >                 ! git fetch [noexistinghost0:2223]:blink.git 2>err &&
> >                 grep ssh err &&
> >                 rm err
> >         )
> > '

This one looks like basically the same test I added in the message
above (except because of the ssh wrapper, we can check that it did
indeed try to ssh to noexistinghost0:2223).

The other tests can check that we fed ssh various host/port/path
combinations. I'm not clear on what we're expecting, though...

> > test_expect_success 'fetch fail noexistinghost1:2223:blink.git' '
> >         (
> >                 ! git fetch "noexistinghost1:2223:blink.git" 2>err &&
> >                 grep ssh err &&
> >                 rm err
> >         )
> > '

We are expecting this to be host=noexistinghost1, and
path=2223:blink.git?

> > test_expect_success 'fetch fail noexistinghost2:2223' '
> >         (
> >                 ! git fetch "noexistinghost2:2223" 2>err &&
> >                 grep ssh err &&
> >                 rm err
> >         )
> > '

And this is host=noexistinghost2, path=2223?

> > test_expect_success 'fetch fail ./noexistinghost4:2223"' '
> >         (
> >                 ! git fetch "./noexistinghost4:2223" 2>err &&
> >                 grep "does not appear to be a git repository" err &&
> >                 rm err
> >         )
> > '

And this one we would be checking that ssh is _not_ used. It seems
redundant with the "./foo:bar" test already in t5601, but perhaps it is
worth double-checking the numeric path. It would be more robust if we
actually had a repo called "noexistinghost4:2223" and checked that we
did clone it, as the existing test does (maybe that test can just
"s/bar/2223/" ?).

-Peff

  reply	other threads:[~2013-10-03  1:31 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 [this message]
2013-10-05 19:48         ` Torsten Bögershausen
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20131003013127.GA7917@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=tboegi@web.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).