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

Re: [Question] git cat-file --batch cannot handle irregular path

From
Jeff King <peff@peff.net>
Date
Apr 23, 2021, 13:07 UTC
Message-ID
<YILGdNkvyG2im6mk@coredump.intra.peff.net>
In-Reply-To
<xmqqim4h7fek.fsf@gitster.g>
On Mon, Apr 19, 2021 at 09:23:31PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> If properly designed, it would have
> 
>  - supported "-z" to take NUL-delimited input, and
> 
>  - when "-z" is not in effect, after reading a single line of input,
>    we would have called quote API to un-cquote the string, so that
>    we can express LF and other special characters in the pathname.
> 
> but those who worked on "cat-file --batch" didn't.
Yeah, this has been a long-standing pain.
It would be easy to add "-z" now, and probably worth doing.

It is too late to do the unquoting thing by default now. We could add an option to enable it, but once "-z" exists, it hardly seems worth it.

-Peff
Previous: Junio C Hamano
Message 3 of 3 in “[Question] git cat-file --batch cannot handle irregular path”
  1. lilinchao@oschina.cnApr 20, 2021
  2. Junio C HamanoApr 20, 2021
  3. Jeff KingApr 23, 2021

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.