From: Patrick Steinhardt Date: Thu, 13 Mar 2025 12:55:34 GMT Subject: Re: [PATCH v2 4/6] rev-list: support delimiting objects with NUL bytes Message-ID: In-Reply-To: <20250313001706.3390502-5-jltobler@gmail.com> On Wed, Mar 12, 2025 at 07:17:04PM -0500, Justin Tobler wrote: > diff --git a/Documentation/rev-list-options.adoc b/Documentation/rev-list-options.adoc > index 785c0786e0..166d3cd19e 100644 > --- a/Documentation/rev-list-options.adoc > +++ b/Documentation/rev-list-options.adoc > @@ -361,6 +361,29 @@ ifdef::git-rev-list[] > --progress=
:: > Show progress reports on stderr as objects are considered. The > `
` text will be printed with each progress update. > + > +-z:: > + Instead of being newline-delimited, each outputted object and its > + accompanying metadata is delimited using NUL bytes in the following > + form: > ++ > +----------------------------------------------------------------------- > + NUL [= NUL]... > +----------------------------------------------------------------------- > ++ > +Additional object metadata, such as object paths, is printed using the > +`=` form. Token values are printed as-is without any > +encoding/truncation. An OID entry never contains a '=' character and thus > +is used to signal the start of a new object record. Examples: > ++ > +----------------------------------------------------------------------- > + NUL > + NUL path= NUL > +----------------------------------------------------------------------- > ++ > +This mode is only compatible with the `--objects` output option. Also, revision > +and pathspec argument parsing on stdin with the `--stdin` option is NUL byte > +delimited instead of using newlines while in this mode. > endif::git-rev-list[] > > History Simplification I feel like this last paragraph, where we talk about `--stdin` being NUL-delimited, should already be mentioned in the first paragraph. Patrick