git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] builtin/cat-file.c: support NUL-delimited input with `-z`

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 11, 2022, 11:52 UTC
Message-ID
<220811.86o7wrov26.gmgdl@evledraar.gmail.com>
In-Reply-To
<ed1583223f63cfde99829069f14af62e4f0f2a82.1658532524.git.me@ttaylorr.com>
On Fri, Jul 22 2022, Taylor Blau wrote:
This change:
Show 25 quoted lines
> diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
> index 24a811f0ef..3515350ed6 100644
> --- a/Documentation/git-cat-file.txt
> +++ b/Documentation/git-cat-file.txt
> @@ -14,7 +14,7 @@ SYNOPSIS
>  'git cat-file' (-t | -s) [--allow-unknown-type] <object>
>  'git cat-file' (--batch | --batch-check | --batch-command) [--batch-all-objects]
>  	     [--buffer] [--follow-symlinks] [--unordered]
> -	     [--textconv | --filters]
> +	     [--textconv | --filters] [-z]
>  'git cat-file' (--textconv | --filters)
>  	     [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]
>  
> [...]
> diff --git a/builtin/cat-file.c b/builtin/cat-file.c
> index f42782e955..c3602d15df 100644
> --- a/builtin/cat-file.c
> +++ b/builtin/cat-file.c
> @@ -31,6 +31,7 @@ struct batch_options {
>  	int all_objects;
>  	int unordered;
>  	int transform_mode; /* may be 'w' or 'c' for --filters or --textconv */
> +	int nul_terminated;
>  	const char *format;
>  };
Is missing a corresponding change to the -h output here. Before this
they were the same, but now:
	
	+ diff -u txt help
	--- txt 2022-08-11 11:53:00.235221628 +0000
	+++ help        2022-08-11 11:53:00.239221594 +0000
	@@ -3,6 +3,6 @@
	 git cat-file (-t | -s) [--allow-unknown-type] <object>
	 git cat-file (--batch | --batch-check | --batch-command) [--batch-all-objects]
	              [--buffer] [--follow-symlinks] [--unordered]
	-             [--textconv | --filters] [-z]
	+             [--textconv | --filters]
	 git cat-file (--textconv | --filters)
	              [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]
(Spotted with some local patches of mine which automatically check this)
Previous: Phillip WoodNext: Junio C Hamano
Message 14 of 15 in “cat-file: support NUL-delimited input with `-z`”
  1. 0/2 cat-file: support NUL-delimited input with `-z`Taylor Blau, Jul 22, 2022
  2. 1/2 t1006: extract --batch-command inputs to variablesTaylor Blau, Jul 22, 2022
  3. 2/2 builtin/cat-file.c: support NUL-delimited input with `-z`Taylor Blau, Jul 22, 2022
  4. Chris TorekJul 22, 2022
  5. Taylor BlauJul 25, 2022
  6. Junio C HamanoJul 23, 2022
  7. Taylor BlauJul 25, 2022
  8. Junio C HamanoJul 27, 2022
  9. Ævar Arnfjörð BjarmasonJul 23, 2022
  10. Junio C HamanoJul 23, 2022
  11. Taylor BlauJul 25, 2022
  12. Junio C HamanoJul 27, 2022
  13. Phillip WoodJul 31, 2022
  14. Ævar Arnfjörð BjarmasonAug 11, 2022
  15. Junio C HamanoJul 23, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.