mbox series

[0/1] cat-file: quote-format name in error when using -z

Message ID 20221209150048.2400648-1-toon@iotcl.com (mailing list archive)
Headers show
Series cat-file: quote-format name in error when using -z | expand

Message

Toon Claes Dec. 9, 2022, 3 p.m. UTC
Hi,

While we at GitLab have been implementing the use of option `-z` for
`git-cat-file` with `--batch` we discovered an extreme edge-case when passing
paths with newlines to the command. In case the object is not found the error
message include the path in the output and thus the error message might get
spread over multiple lines.

The provided patch sanitizes the output, making is easier machine-parse it.

Toon

Toon Claes (1):
  cat-file: quote-format name in error when using -z

 builtin/cat-file.c  | 10 ++++++++++
 t/t1006-cat-file.sh |  8 ++++++++
 2 files changed, 18 insertions(+)


base-commit: 2e71cbbddd64695d43383c25c7a054ac4ff86882
--
2.39.0.rc0.57