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

Re: Stupid quoting...

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 20, 2007, 06:19 UTC
Message-ID
<7vd4zrw3k4.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<Pine.LNX.4.64.0706200307070.4059@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 13 quoted lines
>> I don't see our discourse leading anywhere: the points have been made.
>
> I would really, really, really like to see a solution. Alas, I cannot 
> think of one, other than _forcing_ the developers to use ASCII-only 
> filenames.
>
> Note that there is no convention yet in Git to state which encoding your 
> filenames are supposed to use. And in fact, we already had a fine example 
> in git.git why this is particularly difficult. MacOSX is too clever to be 
> true, in that it gladly takes filenames in one encoding, but reads those 
> filenames out in _another_ encoding. Thus, a "git add <filename>" can well 
> end up in git-status saying that a file was deleted, and another file 
> (actually the same, but in a different encoding) is untracked.

By the way, the pathname quoting done by "diff" does not even attempt to tackle that. I already explained why in the thread so I would not repeat myself.

Having said that, the absolute minimum that needs to be quoted are double-quote (because it is used by quoting as agreed with GNU diff/patch maintainer), backslash (used to introduce C-like quoting), newline and horizontal tab (makes "patch" confused, as it would make it ambiguous where the pathname ends), so I am not opposed to a patch that introduces a new mode, probably on by default _unless_ we are generating --format=email, that does not quote high byte values. That would solve "My UTF-8 filenames are unreadable on my terminal" problem.

Previous: Johannes SchindelinNext: David Kastrup
Message 21 of 35 in “Stupid quoting...”
  1. David KastrupJun 13, 2007
  2. Alex RiesenJun 13, 2007
  3. Johannes SchindelinJun 13, 2007
  4. Steven GrimmJun 14, 2007
  5. Johannes SchindelinJun 14, 2007
  6. Steven GrimmJun 14, 2007
  7. Johannes SchindelinJun 14, 2007
  8. Junio C HamanoJun 14, 2007
  9. Jakub NarebskiJun 16, 2007
  10. David KastrupJun 18, 2007
  11. Jeff KingJun 18, 2007
  12. Johannes SchindelinJun 19, 2007
  13. David KastrupJun 19, 2007
  14. Johannes SchindelinJun 19, 2007
  15. Olivier GalibertJun 19, 2007
  16. Johannes SchindelinJun 14, 2007
  17. David KastrupJun 14, 2007
  18. Alex RiesenJun 14, 2007
  19. Alex RiesenJun 14, 2007
  20. Johannes SchindelinJun 20, 2007
  21. Junio C HamanoJun 20, 2007
  22. David KastrupJun 20, 2007
  23. Jakub NarebskiJun 20, 2007
  24. David KastrupJun 20, 2007
  25. Jan HudecJun 24, 2007
  26. Robin RosenbergJun 24, 2007
  27. Junio C HamanoJun 24, 2007
  28. David KastrupJun 24, 2007
  29. Junio C HamanoJun 24, 2007
  30. Jeff KingJun 24, 2007
  31. Jan HudecJun 24, 2007
  32. Robin RosenbergJun 24, 2007
  33. David KastrupJun 24, 2007
  34. Robin RosenbergJun 24, 2007
  35. David KastrupJun 24, 2007

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.