git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Jeff King
Message 3 of 4 in “git clone: is an URL local or ssh”
  1. git clone: is an URL local or sshTorsten Bögershausen, Oct 28, 2013
  2. Junio C HamanoOct 28, 2013
  3. Jeff KingOct 29, 2013
  4. Jeff KingOct 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.