From: Kristoffer Haugsbakk Date: Thu, 05 Feb 2026 17:44:23 GMT Subject: Re: [PATCH 05/11] config-batch: add NUL-terminated I/O format Message-ID: In-Reply-To: <33faa3f134c81761631c34600477dcbf82e619e5.1770214803.git.gitgitgadget@gmail.com> On Wed, Feb 4, 2026, at 15:19, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee >[snip] > +OPTIONS > +------- > + > +`-z`:: > + If specified, then use the NUL-terminated input and output It seems to me that using the imperative mood for options might be preferred now. Like: Use NUL-terminated input and output... See: https://lore.kernel.org/git/bcd6fcd1190fe21c667b5253a4a33b833e658609.1769462744.git.gitgitgadget@gmail.com/ >[snip] > - line provides the count of possible commands via `help count `. > - The next `` lines are of the form `help ` > + line provides the count of possible commands via `help 1 count `. > + The next `` lines are of the form `help 1 ` > to state that this Git version supports that `` at > version ``. Note that the same command may have multiple > available versions. > + > -Here is the currentl output of the help text at the latest version: > +Here is the current output of the help text at the latest version: Innocent intra-series typofix. > + > ------------ > help 1 count 2 > @@ -102,6 +111,48 @@ get 1 missing [|] > where `` or `` is only supplied if provided in > the command. > > +NUL-Terminated Format > +~~~~~~~~~~~~~~~~~~~~~ > + > +When `-z` is given, the protocol changes in some structural ways. It might flow better with “Option `-z` changes the protocol...” ? I don’t know how usual it is to say “Option ”. >[snip] > +static void print_word(const char *word, int start) > +{ > + if (zformat) { > + printf("%"PRIu32":%s", (uint32_t)strlen(word), word); > + fputc(0, stdout); > + } else if (start) All of the arms should get braces here. > + printf("%s", word); > + else > + printf(" %s", word); > +} > + >[snip]