All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: lilinchao@oschina.cn, git <git@vger.kernel.org>
Subject: Re: [Question] git cat-file --batch cannot handle irregular path
Date: Fri, 23 Apr 2021 09:07:00 -0400	[thread overview]
Message-ID: <YILGdNkvyG2im6mk@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqim4h7fek.fsf@gitster.g>

On Mon, Apr 19, 2021 at 09:23:31PM -0700, Junio C Hamano wrote:

> 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

      reply	other threads:[~2021-04-23 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  3:48 [Question] git cat-file --batch cannot handle irregular path lilinchao
2021-04-20  4:23 ` Junio C Hamano
2021-04-23 13:07   ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YILGdNkvyG2im6mk@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lilinchao@oschina.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.