Re: [PATCH v2 2/5] builtin/repo: collect largest inflated objects
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Mar 2, 2026, 17:38 UTC
- Message-ID
- <aaXI0M7Ztk-Swm18@denethor>
- In-Reply-To
- <C99EBCF9-7980-495A-94C5-576AC6D140F3@gmail.com>
On 26/02/28 08:36PM, Lucas Seiki Oshiro wrote:
Show 22 quoted lines
>
> > struct repo_structure {
> > @@ -371,6 +385,21 @@ static void stats_table_setup_structure(struct stats_table *table,
> > " * %s", _("Blobs"));
> > stats_table_size_addf(table, objects->disk_sizes.tags,
> > " * %s", _("Tags"));
> > +
> > + stats_table_addf(table, "");
> > + stats_table_addf(table, "* %s", _("Largest objects"));
> > + stats_table_addf(table, " * %s", _("Commits"));
> > + stats_table_size_addf(table, objects->largest.commit_size.value,
> > + " * %s", _("Maximum size"));
>
> I don't know if it's the best place to comment this, but it would be
> nice if we could find the commit that introduced the largest change,
> in terms of size or number of lines.
>
> This would be useful for people who are asking "what's the largest
> commmit?" thinking about the introduced changes (like what we see in
> GitLab's interface) instead of the size of the commit object, which
> generally is proportional to the message size + the number of
> parents.I assume by largest change we are referring to finding the commit that has the most lines changed between it and its parent. This could be interesting, but I suspect it could be quite costly to compute for large repositories with many commits. This type of information is not actually stored in the repository and would have to be computed on the fly. Since this information is not really part of the repository structure, it might not be a great fit for this command either. I'm not quite sure about this one.
Thanks, -Justin