Subject: Re: [PATCH] repo: add new flag --keys to git-repo-info

From: Lucas Seiki Oshiro <[email-masked]>
Date: Mon, 8 Dec 2025 13:33:59 -0300

> We do not need to say "Currently," but other than that the above is
> very well written.  Easy to grok and to the point.

Thanks!

> Shouldn't "--keys" be explicitly marked incompatible with "--all"
> and remaining keys in argc/argv[]?

Yes, I'll work on that.

> While there is no strong reason why anybody must use NUL-terminated
> output format, simply because repo_info_fields[] contains no tokens
> with strange byte values, but just as principle, shouldn't
> 
>    "git repo info --keys -z"
> 
> do what is naturally expected?

Hmmm... Perhaps it's too much for this simple flag. `-z` is tied to
--format here, and if we want to support -z we'll also need to 
support --format.

What about adding a "default" format for --format? This way, it
would translate to:

- keyvalue, when using info without --keys
- table, when using structure
- using puts, when using info with --keys

Another solution, of course, would be aborting when --format, -z or
--all are used with --keys.