builtin/repo: add object counts in structure output

The amount of objects in a repository can provide insight regarding its
shape. To surface this information, use the path-walk API to count the
number of reachable objects in the repository by object type. All
regular references are used to determine the reachable set of objects.
The object counts are appended to the same table containing the
reference information.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Justin Tobler
2025-10-21 13:25:59 -05:00
committed by Junio C Hamano
parent bbb2b93348
commit eb5cf58ffc
3 changed files with 118 additions and 9 deletions

View File

@@ -49,6 +49,7 @@ supported:
following kinds of information are reported:
+
* Reference counts categorized by type
* Reachable object counts categorized by type
+
The table output format may change and is not intended for machine parsing.