From: Junio C Hamano Date: Tue, 02 Sep 2025 16:21:07 GMT Subject: Re: [GSoC PATCH v3 1/2] repo: add the flag -z as an alias for --format=nul Message-ID: In-Reply-To: <20250901172732.98845-2-lucasseikioshiro@gmail.com> Lucas Seiki Oshiro writes: > 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 | 37 +++++++++++++++++++++++++------------ > t/t1900-repo.sh | 12 ++++++++++++ > 3 files changed, 41 insertions(+), 14 deletions(-) > > diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc > index 2870828d93..6f5ee88215 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] [...] This is OK and I do not want you to reroll only to revert this, but FWIW what you had in the previous iteration git repo info [--format=(keyvalue|nul) | -z] [...] would also work perfectly well here. It is not like you are forbidding the command line to mention "--format=nul" twice, or "--format=keyvalue --format=nul" to allow the later one to override the former ones. The updated option parsing looks much nicer. Thanks.