Re: [PATCH v3 2/2] repo: add new flag --keys to git-repo-info
On Friday, 9 January 2026 21:31:53 CET Lucas Seiki Oshiro wrote:
Show 32 quoted lines
> If the user wants to find what are the available keys, they need to
> either check the documentation or to ask for all the key-value pairs
> by using --all.
>
> Add a new flag --keys for listing only the available keys without
> listing the values.
>
> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
> ---
> Documentation/git-repo.adoc | 11 +++++++++++
> builtin/repo.c | 32 ++++++++++++++++++++++++++++++++
> t/t1900-repo.sh | 34 +++++++++++++++++++++++-----------
> 3 files changed, 66 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc
> index fa0e6600af..4471816cc8 100644
> --- a/Documentation/git-repo.adoc
> +++ b/Documentation/git-repo.adoc
> @@ -9,6 +9,7 @@ SYNOPSIS
> --------
> [synopsis]
> git repo info [--format=(default|keyvalue|nul) | -z] [--all | <key>...]
> +git repo info --keys [--format=(default|nul) | -z]
> git repo structure [--format=(default|table|keyvalue|nul) | -z]
>
> DESCRIPTION
> @@ -47,6 +48,16 @@ supported:
> +
> `-z` is an alias for `--format=nul`.
>
> +`info --keys [--format=(default|nul) | -z]`::
> + List all the available keys, one per line. The output format can be
Show 7 quoted lines
> + through the flag `--format`. The following formats are supported:
> ++
> +`default`:::
> + output the keys one per line.
> +
> +`nul`:::
> + similar to `default`, but using a NUL character after each value.
We use the placeholder format for character names: _NUL_