Re: [PATCH 3/4] builtin/repo: add keyvalue format for stats
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Sep 23, 2025, 15:59 UTC
- Message-ID
- <hapuro77uciopotqmkjrapnomyojsys7mfmurkuvecu4fy6il5@echgeotkgcmk>
- In-Reply-To
- <CAOLa=ZT0y-WOOFz8FdLm40AqwEATzNsg2fzvnJKPzx2mkPiz-g@mail.gmail.com>
On 25/09/23 11:39AM, Karthik Nayak wrote:
Show 40 quoted lines
> Justin Tobler <jltobler@gmail.com> writes: > > [snip] > > > diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc > > index 2a67abfca8..7d0341e4f1 100644 > > --- a/Documentation/git-repo.adoc > > +++ b/Documentation/git-repo.adoc > > @@ -9,7 +9,7 @@ SYNOPSIS > > -------- > > [synopsis] > > git repo info [--format=(keyvalue|nul)] [-z] [<key>...] > > -git repo stats > > +git repo stats [--format=(table|keyvalue)] > > > > DESCRIPTION > > ----------- > > @@ -44,12 +44,22 @@ supported: > > + > > `-z` is an alias for `--format=nul`. > > > > -stats:: > > +`stats [--format=(table|keyvalue)]`:: > > Retrieve stats about the current repository. All references and > > reachable objects in the repository are categorized and counted > > accordingly. > > + > > -The table output format may change and is not intended for machine parsing. > > +The output format can be chosen through the flag `--format`. Two formats are > > +supported: > > ++ > > +`table`::: > > + Outputs repository stats in a human-friendly table and is used by > > + default. This format may change and is not intended for machine > > + parsing. > > + > > +`keyvalue`::: > > + Each line of output contains a key-value pair of a repostiory stat. The > > s/repostiory/repository
Will fix.
Show 5 quoted lines
> > + '=' character is used to delimit between the key and the value. > > > > Does each value end with a newline or with a NUL? We should mention > that here.
I was thinking that this would be implied by the prior sentence, but it is probably better to be more explicit here. Will update. :)
-Justin