Re: [PATCH 1/4] builtin/repo: introduce stats subcommand
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 23, 2025, 15:26 UTC
- Message-ID
- <aNK8KujMRfV93nag@pks.im>
- In-Reply-To
- <w4c752odnthf26stoiu7he2xk6fucocmsnxo5pa5vh5sg647g2@a6vphhukasgv>
On Tue, Sep 23, 2025 at 10:10:50AM -0500, Justin Tobler wrote:
> On 25/09/23 12:52PM, Patrick Steinhardt wrote: > > On Mon, Sep 22, 2025 at 09:56:57PM -0500, Justin Tobler wrote:
[snip]
Show 19 quoted lines
> > > +static void stats_table_setup(struct stats_table *table, struct stats *stats)
> > > +{
> > > + size_t ref_total;
> > > +
> > > + ref_total = stats->branches + stats->remotes + stats->tags + stats->others;
> > > + stats_table_add(table, _("* References"), NULL);
> > > + stats_table_add_count(table, _(" * Count"), ref_total);
> > > + stats_table_add_count(table, _(" * Branches"), stats->branches);
> > > + stats_table_add_count(table, _(" * Tags"), stats->tags);
> > > + stats_table_add_count(table, _(" * Remotes"), stats->remotes);
> > > + stats_table_add_count(table, _(" * Others"), stats->others);
> > > +}
> >
> > Would it make sense to not translate the formatting directives, but only
> > the actual words?
>
> From a simplicity stand point, it is quite nice to have the formatted
> offsets baked-in. It is probably better to separate out the
> transalations though? I'll interate on this in the next version.Yeah, I don't mind the baked-in offsets. We could allow formatting directives here and then pass the translated nouns as varargs.
Patrick