Skip to content

cat-file: support NUL-delimited input with `-z`

Taylor Blau git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t1006: extract --batch-command inputs to variablest/t1006-cat-file.sh+16 -140 replies
2/2builtin/cat-file.c: support NUL-delimited input with `-z`Documentation/git-cat-file.txt builtin/cat-file.c t/t1006-cat-file.sh+72 -511 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] cat-file: support NUL-delimited input with `-z`

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(-)
Signature · 1 line
2.37.0.1.g1379af2e9d