Re: [PATCH v3 2/6] builtin/repo: add helper for printing keyvalue output
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 3, 2026, 17:40 UTC
- Message-ID
- <xmqq7brserq7.fsf@gitster.g>
- In-Reply-To
- <aabhtfWZG90YyhQ5@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 6 quoted lines
>> + print_keyvalue("references.branches.count", key_delim,
>> + stats->refs.branches, value_delim);
>> ...
>
> It's still easy to miss any mismatch here, but I guess the result is
> definitely easier to read regardless of that.Sure, we could further do something silly like
#define P(name, source) print_keyvalue(name, key_delim, source, value_delim)
and reduce the above to
P("references.branches.count", stats->refs.branches);if we wanted to.