From: Jean-Noël AVILA Date: Thu, 21 Aug 2025 18:23:58 GMT Subject: Re: [GSoC PATCH 1/2] repo: add the flag -z as an alias for --format=nul Message-ID: <6186055.lOV4Wx5bFT@cayenne> In-Reply-To: <20250820144247.79197-2-lucasseikioshiro@gmail.com> On Wednesday, 20 August 2025 16:42:46 CEST Lucas Seiki Oshiro wrote: > Other Git commands that have nul-terminated output (e.g. git-config, > git-status, git-ls-files) have a flag `-z` for using the null character > as the record separator. > > Add the `-z` flag to git-repo-info as an alias for `--format=nul`, > making it consistent with the behavior of the other commands. > > Mentored-by: Karthik Nayak > Mentored-by: Patrick Steinhardt > Signed-off-by: Lucas Seiki Oshiro > --- > Documentation/git-repo.adoc | 6 ++++-- > builtin/repo.c | 17 ++++++++++++----- > t/t1900-repo.sh | 12 ++++++++++++ > 3 files changed, 28 insertions(+), 7 deletions(-) > > diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc > index 2870828d93..f2dc71193c 100644 > --- a/Documentation/git-repo.adoc > +++ b/Documentation/git-repo.adoc > @@ -8,7 +8,7 @@ git-repo - Retrieve information about the repository > SYNOPSIS > -------- > [synopsis] > -git repo info [--format=(keyvalue|nul)] [...] > +git repo info [--format=(keyvalue|nul)|-z] [...] > In fact the correct formatting is: [--format=(keyvalue|nul) | -z] [...] As stated in "CodingGuidelines: Use spacing around "|" token(s), but not immediately after opening or before closing a [] or () pair: Do: [-q | --quiet] Don't: [-q|--quiet] Don't use spacing around "|" tokens when they're used to separate the alternate arguments of an option: Do: --track[=(direct|inherit)] Don't: --track[=(direct | inherit)]