Re: [PATCH 2/4] builtin/repo: add object counts in stats output
On 25/09/23 10:30AM, Karthik Nayak wrote:
Show 36 quoted lines
> Justin Tobler <jltobler@gmail.com> writes:
>
> [snip]
>
> > @@ -159,13 +161,25 @@ static int repo_info(int argc, const char **argv, const char *prefix,
> > return print_fields(argc, argv, repo, format);
> > }
> >
> > -struct stats {
> > +struct ref_stats {
> > size_t branches;
> > size_t remotes;
> > size_t tags;
> > size_t others;
> > };
> >
> > +struct object_stats {
> > + size_t tags;
> > + size_t commits;
> > + size_t trees;
> > + size_t blobs;
> > +};
> > +
> > +struct stats {
> > + struct ref_stats refs;
> > + struct object_stats objects;
> > +};
> > +
>
> Okay so we do use nested structs, which I mentioned in the previous
> commit, so we're all good.
>
> Nit: A lot of the diff in this commit is because we don't make the
> required structs in the previous commit. Perhaps we could start with the
> nested structs in the previous commit? That way this patch would be much
> simpler.Ya, I clean this up in the next version.
-Justin