Re: [PATCH v6 4/7] builtin/repo: introduce structure subcommand
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Oct 22, 2025, 23:42 UTC
- Message-ID
- <wmprwnikryda3zairkyyqyn5lapernapivgq63ckhwlt2ispqu@onebdrpp3axf>
- In-Reply-To
- <DBB5E6F1-D2C5-4A3C-9FA7-89147D64BCEC@gmail.com>
On 25/10/22 05:15PM, Lucas Seiki Oshiro wrote:
Show 6 quoted lines
> > > +static void stats_table_print_structure(const struct stats_table *table) > > Question: isn't it possible to use the tables from column.c by > allowing them to use a cell delimiter? This table formatter seems to > be useful for other places, like git-repo-info itself.
I opted to create a table formatter specific stats output so we could be more flexible with how individual column data is displayed. git-repo-structure having its own table format allows it to more easily configure things like cell value alignment column-by-column. Also, in a followup series I plan to introduce measurement units to values displayed in the table, but I still want to align values and units separately while still being in the same cell. This sort of configuration wouldn't fit well in the existing "column.c" table format IMO.
I did try to design this new stats table format in a way that its could be reused by other git-repo(1) subcommands if ever needed. So we want to use it for git-repo-info itself in the future, I think we could do so relatively easily.
-Justin