From: Justin Tobler Date: Tue, 03 Mar 2026 18:08:19 GMT Subject: Re: [PATCH v3 2/6] builtin/repo: add helper for printing keyvalue output Message-ID: In-Reply-To: On 26/03/03 09:40AM, Junio C Hamano wrote: > Patrick Steinhardt writes: > > >> + 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); This does indeed cut down on some of the boilerplate, which maybe would make it a little bit easier to catch any mismatches. > if we wanted to. Ultimately, I don't feel strongly either way though. I've amended locally, but will hold off on sending another version for now unless there is additional feedback. Thanks, -Justin