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

Re: [PATCH 1/2] git-fast-import.txt: improve documentation for quoted paths

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Nov 29, 2012, 18:47 UTC
Message-ID
<vpqhao8gsaj.fsf@grenoble-inp.fr>
In-Reply-To
<20121129181141.GA17309@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> So technically, your modification to the beginning of the sentence is
> not correct.

I'd say the resulting sentence is somehow incorrect, but not more than the previous one (both say "if ..." without really telling what the condition was).

>> If an `LF`, backslash or double quote must be encoded
>                        ^
>                        missing comma as list delimiter

Google tells me that my version was UK-correct but not US-correct. As french, I have no opinion on the subject, I take yours ;-).

How about this:

A path can use the C-style string quoting (this is accepted in all cases and mandatory if the filename starts with double quote or contains `LF`). In C-style quoting, `LF`, backslash, and double quote characters must be escaped by preceding them with a backslash. Also, the complete name should be surrounded with double quotes (e.g. `"path/with\n, \\ and \" in it"`).

This should be technically correct, and "this is accepted in all cases" should encourrage people to use it.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Jeff KingNext: Jeff King
Message 7 of 16 in “git-remote-mediawiki: escape double quotes and LF in file names”
  1. git-remote-mediawiki: escape double quotes and LF in file namesMatthieu Moy, Nov 29, 2012
  2. Junio C HamanoNov 29, 2012
  3. Matthieu MoyNov 29, 2012
  4. 1/2 git-fast-import.txt: improve documentation for quoted pathsMatthieu Moy, Nov 29, 2012
  5. 2/2 git-remote-mediawiki: escape ", \, and LF in file namesMatthieu Moy, Nov 29, 2012
  6. Jeff KingNov 29, 2012
  7. Matthieu MoyNov 29, 2012
  8. Jeff KingNov 29, 2012
  9. 1/2 git-fast-import.txt: improve documentation for quoted pathsMatthieu Moy, Nov 29, 2012
  10. 2/2 git-remote-mediawiki: escape ", \, and LF in file namesMatthieu Moy, Nov 29, 2012
  11. Junio C HamanoNov 29, 2012
  12. Jeff KingNov 29, 2012
  13. Junio C HamanoNov 29, 2012
  14. Jeff KingNov 29, 2012
  15. Matthieu MoyNov 30, 2012
  16. Junio C HamanoDec 2, 2012

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.