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

Re: git-pull-script hates me

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 6, 2005, 21:36 UTC
Message-ID
<Pine.LNX.4.58.0507061434010.3847@g5.osdl.org>
In-Reply-To
<7v64vnwrwg.fsf@assigned-by-dhcp.cox.net>
On Wed, 6 Jul 2005, Junio C Hamano wrote:
> 
> Anybody who is interested in doing this can just move
> sq_expand() from diff.c to some public library and expose it in
> cache.h.
No, that doesn't work at all.

"sq_expand()" tries to protect things inside single quotes. That's a totally different problem (and btw, it does so badly: it doesn't quote '\' for example).

For a shell command line, there are _tons_ of special characters that you mustn't pass through. Things like ';', '<', '>', '&' all have magic meaning and are not valid in the destination name. Not to mention just simple whitespace.

		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 10 in “git-pull-script hates me”
  1. Greg KHJul 6, 2005
  2. Linus TorvaldsJul 6, 2005
  3. Greg KHJul 6, 2005
  4. Greg KHJul 6, 2005
  5. Linus TorvaldsJul 6, 2005
  6. Junio C HamanoJul 6, 2005
  7. Linus TorvaldsJul 6, 2005
  8. Make sq_expand() available as sq_quote().Junio C Hamano, Jul 8, 2005
  9. Make sq_expand() available as sq_quote().Junio C Hamano, Jul 8, 2005
  10. Use sq_quote() to properly quote the parameter to call shell.Junio C Hamano, Jul 8, 2005

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.