Lucas Seiki Oshiro <lucasseikioshiro@xxxxxxxxx> 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 <karthik.188@xxxxxxxxx> > Mentored-by: Patrick Steinhardt <ps@xxxxxx> > Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@xxxxxxxxx> > --- > 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)] [<key>...] > +git repo info [--format=(keyvalue|nul)] [-z] [<key>...] 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] [<key>...] 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.