Re: [PATCH V2] git clone: is an URL local or ssh
- From
Jeff King <peff@peff.net>
- Date
- Oct 29, 2013, 01:49 UTC
- Message-ID
- <20131029014945.GC11861@sigill.intra.peff.net>
- In-Reply-To
- <xmqqmwltdsgm.fsf@gitster.dls.corp.google.com>
On Mon, Oct 28, 2013 at 01:57:13PM -0700, Junio C Hamano wrote:
Show 25 quoted lines
> > +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"Yeah, I think you are right. This one is my fault from 8d3d28f; I think in an earlier draft I had more complex logic that needed the {}, and then never dropped them when it got simplified.
-Peff