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