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

Re: [PATCH v3 1/4] quote: add c quote flag to ignore core.quotePath

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 4, 2025, 16:40 UTC
Message-ID
<xmqqikppvf2t.fsf@gitster.g>
In-Reply-To
<xmqq4j1a1wvr.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> So regardless of what the future default value of core.quotePath
> would be, I am not convinced that it is a good idea to octal quote
> any and all bytes outside the ASCII range in the rev-list output.
>
> After all, "git rev-list --objects" would show such a path without
> quoting, no [*]?
>
>     Side note: the path in the output from "git rev-list --objects"
>     is a hack to allow receiving end to compute a path hash, and
>     does not have to be strictly reversible, so it emits verbatim
>     bytes but truncates the output at LF to preserve the one-line
>     one-object output format.
>
> We do need to quote certain bytes (e.g., LF cannot be allowed
> verbatim, when the output is line-oriented, and we use C-quote,
> which means literal double-quote needs to be also quoted), so we
> cannot mimic paths emitted by "git rev-list --objects", but I do not
> think it buys us much to quote non-ASCII bytes these days.
Rereading this I realize that I was not quite making sense.
A short version of what I wanted to say is:
 - The output format need to do some quoting anyway because it is
   inevitable to make the string stuffed as "value" in a space
   separated list of var=value on a single line.
 - It does not really matter if core.quotePath allows us to pass
   bytes with 8-bit set (e.g. UTF-8 outside ASCII) unquoted or
   require quoting.  The receiving end must be prepared to unquote,
   so it is dubious that a new feature to ignore core.quotePath is
   needed.
 - We do need to quote SP that cquote does not require quoting, so
   some wrapping around quote_c_style() like quote_path() does is
   needed.
Thanks.
Previous: Junio C HamanoNext: Justin Tobler
Message 14 of 37 in “rev-list: print missing object type with --missing=print-type”
  1. rev-list: print missing object type with --missing=print-typeJustin Tobler, Jan 8, 2025
  2. Christian CouderJan 8, 2025
  3. Justin ToblerJan 8, 2025
  4. Junio C HamanoJan 8, 2025
  5. Justin ToblerJan 8, 2025
  6. Junio C HamanoJan 8, 2025
  7. Justin ToblerJan 8, 2025
  8. 0/2 rev-list: print additional missing object informationJustin Tobler, Jan 10, 2025
  9. 0/4 rev-list: print additional missing object informationJustin Tobler, Feb 1, 2025
  10. 1/4 quote: add c quote flag to ignore core.quotePathJustin Tobler, Feb 1, 2025
  11. Christian CouderFeb 3, 2025
  12. Junio C HamanoFeb 3, 2025
  13. Junio C HamanoFeb 3, 2025
  14. Junio C HamanoFeb 4, 2025
  15. Justin ToblerFeb 4, 2025
  16. 2/4 quote: add quote_path() flag to ignore configJustin Tobler, Feb 1, 2025
  17. Phillip WoodFeb 2, 2025
  18. Justin ToblerFeb 4, 2025
  19. Phillip WoodFeb 11, 2025
  20. Christian CouderFeb 3, 2025
  21. Junio C HamanoFeb 3, 2025
  22. 3/4 rev-list: add print-info action to print missing object pathJustin Tobler, Feb 1, 2025
  23. 4/4 rev-list: extend print-info to print missing object typeJustin Tobler, Feb 1, 2025
  24. Christian CouderFeb 3, 2025
  25. Justin ToblerFeb 4, 2025
  26. 0/2 rev-list: print additional missing object informationJustin Tobler, Feb 5, 2025
  27. 1/2 rev-list: add print-info action to print missing object pathJustin Tobler, Feb 5, 2025
  28. 2/2 rev-list: extend print-info to print missing object typeJustin Tobler, Feb 5, 2025
  29. Christian CouderFeb 5, 2025
  30. Justin ToblerFeb 5, 2025
  31. Junio C HamanoFeb 5, 2025
  32. Justin ToblerFeb 5, 2025
  33. Junio C HamanoFeb 5, 2025
  34. 1/2 rev-list: add --missing-info to print missing object pathJustin Tobler, Jan 10, 2025
  35. Christian CouderJan 10, 2025
  36. Junio C HamanoJan 10, 2025
  37. 2/2 rev-list: extend --missing-info to print missing object typeJustin Tobler, Jan 10, 2025

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.