Re: [PATCH v4 4/7] builtin/repo: introduce stats subcommand
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Oct 10, 2025, 00:42 UTC
- Message-ID
- <gzjaa3nmv6s44dszregri7kcnfxg6optkycg2wggtib6bxvdgq@elearr6dishf>
- In-Reply-To
- <qdot36lscj2jzuej2zixdlgocubiimh54dkxzl2xgcy3g2n42m@gpdi7jwc2oyd>
On 25/10/09 05:09PM, Justin Tobler wrote:
Show 20 quoted lines
> On 25/09/27 09:32AM, Junio C Hamano wrote: > > With Devil's advocate hat on, a single command that gives a set of > > stats that are "key" to a goal of a single use case may not be as > > useful as a collection of commands, each of which gives stats on one > > aspect of the repository, that can be combined to help you address > > various different goals. > > Good points. From my perspective, the benefit of having a single command > here is to provide a simple means to generate a report of the general > repository shape. In this context, "key stats" reflect certain > charactistics about the repository that may be concerning performance > wise for typical repository operations or just of interest in general. > > One of the motivations here is to enable a user to easily generate such > a report and be able to share it with others that may not have access to > the underlying repository. > > I think this still could leave room for more fine-grained commands that > can surface more targeted information about a repository with other > goals in mind in the future though.
Thinking about this some more, a single "stats" command is indeed rather vauge. Furthermore, as Junio mentioned, there could be other aspects of a repository that we want to display stats for in the future.
Since the goal of this command is to surface info about a repositories structure, may we should instead call this command `git repo structure`? Or something else along those lines that in more specific and related to goal of the command?
-Justin