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

Re: [PATCH] submodule: prevent backslash expantion in submodule names

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2017, 03:09 UTC
Message-ID
<xmqqr30rk9wl.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170408105901.2osi2zadboqxhf34@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> The reason I mentioned escaping earlier is I wondered what would happen
> when the submodule starts with a double-quote, or has a newline in the
> name. Git's normal quoting would include backslash escape sequences, and
> I wondered if we might be relying on any of these "read" calls to
> interpret them. But I don't think so, for two reasons.
>
> One, because that quoting also puts double-quotes around the name. So
> plain "read" would not be sufficient to de-quote for us anyway.

Correct. These are c-quoting and "read" does not know what to do with them.

> And two, because these are being fed from "submodule--helper", which
> does not seem to quote in the first place.

Which probably is a bug we can fix safely, as submodule--helper is merely an implementation detail of our toolset, not something the end users' scripts can rely on.

Previous: Joachim Durchholz
Message 11 of 11 in “problem with backslash in directory name”
  1. Joachim DurchholzApr 7, 2017
  2. Jeff KingApr 7, 2017
  3. Joachim DurchholzApr 7, 2017
  4. Joachim DurchholzApr 7, 2017
  5. Brandon WilliamsApr 7, 2017
  6. Stefan BellerApr 7, 2017
  7. submodule: prevent backslash expantion in submodule namesBrandon Williams, Apr 7, 2017
  8. Joachim DurchholzApr 7, 2017
  9. Jeff KingApr 8, 2017
  10. Joachim DurchholzApr 8, 2017
  11. Junio C HamanoApr 17, 2017

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.