Re: [GSoC RFC PATCH v4 1/4] repo: declare the repo command
From: Justin Tobler <hidden>
Date: 2025-07-15 18:44:11
On 25/07/15 01:59PM, Patrick Steinhardt wrote:
On Mon, Jul 14, 2025 at 08:52:28PM -0300, Lucas Seiki Oshiro wrote:quoted
+This command returns the retrieved data following a null-terminated format with +this syntax: ++ +---------------- +key1<LF>value1<NUL> +key2<LF>value2<NUL> +... +---------------- ++One of the things I wonder is whether we should by default adapt those tools to have human-readable format, e.g. in a way that it can be easily added to git-bugreport(1). This would teach script authors that want to use the command to use `git repo info --format=porcelain` right from the start to have a machine-parseable output, and it would allow us to iterate on the exact output format.
For this subcommand (and the future "stats" one), I think the ouput should default to a simple <key=value> form for each line and use a `-z` flag to add support for a nul-delimited mode. This way we still have a default view that a human can feasible consume while also supporting a more machine friendly format in a manner consistent with other commands. For a more decorated view of the data, something akin to git-sizer(1), maybe we could introduce a separate subcommand in the future like `git repo summary`. This could allow us to implement other information such as "level of concern" separately and also group the data in a way that is easier to digest. -Justin