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

Re: [jgit PATCH] Paper bag fix quoting for SSH transport commands

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jun 22, 2008, 22:15 UTC
Message-ID
<20080622221545.GF11793@spearce.org>
In-Reply-To
<200806221954.08919.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
Show 10 quoted lines
> söndagen den 22 juni 2008 03.36.40 skrev Shawn O. Pearce:
> > 
> > Testing concludes that git-shell requires the command name to never
> > be quoted, and the argument name to always be single quoted.  As
> > this is a long-standing behavior in the wild jgit needs to conform,
> > as git-shell and all git-shell work-a-likes such as gitosis may be
> > following the same convention.
> 
> Seems ok and works here. Error handling still has a paperbagish feel. See
> follow up patches.

Well, I wasn't trying to clean up error handling, I was just trying to make `jgit fetch` work against repo.or.cz. But I agree, the error handling and feedback in the transport code could be improved.

> Maybe we should have a patch for git too so it will actually work
> with spaces in file names. What do people on Windows do? (those that
> actually get an SSH server up and running and sleep well overe it
> on that platform).

The issue only happens with the command name, which most people use just git-upload-pack/git-receive-pack as they have git in their $PATH on the remote side, or are running git-shell. I suspect that Windows users just don't run Git over SSH with paths that contain spaces to access git-upload-pack remotely.

I'd patch Git to use the same rule as jgit and only quote the command when really necessary, but its not high on my list of things to do this month. :-)

> As for pushing and signing. One way is for you (Shawn) and me is
> to sign-off and push each other's patches. I pushed this one.

Given that repo.or.cz doesn't show reflogs, I take it this is only a way to make sure at least someone has reviewed the patch before it goes into the main tree, since we both have write access? I can live with that.

-- 
Shawn.
Previous: Robin RosenbergNext: Robin Rosenberg
Message 7 of 8 in “Paper bag fix quoting for SSH transport commands”
  1. Paper bag fix quoting for SSH transport commandsShawn O. Pearce, Jun 22, 2008
  2. Take care of errors reported from the server when upload command is startedRobin Rosenberg, Jun 22, 2008
  3. Clone: Handle cancel in clone dialog speciallyRobin Rosenberg, Jun 22, 2008
  4. Clone: If url is changed was changed, forget the old valueRobin Rosenberg, Jun 22, 2008
  5. Shawn O. PearceJun 22, 2008
  6. Robin RosenbergJun 22, 2008
  7. Shawn O. PearceJun 22, 2008
  8. Robin RosenbergJun 23, 2008

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.