git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH 0/2] cat-file: support NUL-delimited input with `-z`
Date: Fri, 22 Jul 2022 19:28:54 -0400	[thread overview]
Message-ID: <cover.1658532524.git.me@ttaylorr.com> (raw)

This short patch series implements a `-z` mode that is compatible with
the `--batch`, `--batch-check`, and new `--batch-command` options in
`cat-file`.

This came out of a request from a colleague to support `cat-file`
invocations that refer to a tree entry whose name includes a newline
character.

The implementation is mostly straightforward, though the second patch
(which contains the main substance of this change) has a few additional
thoughts on areas for future cleanup. The first patch is preparatory, but
could easily be squashed, too.

Thanks in advance for your review!

Taylor Blau (2):
  t1006: extract --batch-command inputs to variables
  builtin/cat-file.c: support NUL-delimited input with `-z`

 Documentation/git-cat-file.txt |  7 +++-
 builtin/cat-file.c             | 28 +++++++++++--
 t/t1006-cat-file.sh            | 72 +++++++++++++++++++++++++++-------
 3 files changed, 88 insertions(+), 19 deletions(-)

-- 
2.37.0.1.g1379af2e9d

             reply	other threads:[~2022-07-22 23:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 23:28 Taylor Blau [this message]
2022-07-22 23:29 ` [PATCH 1/2] t1006: extract --batch-command inputs to variables Taylor Blau
2022-07-22 23:29 ` [PATCH 2/2] builtin/cat-file.c: support NUL-delimited input with `-z` Taylor Blau
2022-07-22 23:41   ` Chris Torek
2022-07-25 23:39     ` Taylor Blau
2022-07-23  5:17   ` Ævar Arnfjörð Bjarmason
2022-07-23 17:45     ` Junio C Hamano
2022-07-25 23:44       ` Taylor Blau
2022-07-27 14:10         ` Junio C Hamano
2022-07-23  5:35   ` Junio C Hamano
2022-07-25 23:50     ` Taylor Blau
2022-07-27 14:20       ` Junio C Hamano
2022-07-31 15:50   ` Phillip Wood
2022-08-11 11:52   ` Ævar Arnfjörð Bjarmason
2022-07-23  4:44 ` [PATCH 0/2] cat-file: " Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=cover.1658532524.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).