Subject: Re: [PATCH v4 01/10] repo: teach info context and category keys

From: Junio C Hamano <[email-masked]>
Date: Thu, 26 Feb 2026 15:21:17 -0800

"Eslam reda ragheb via GitGitGadget" <[email-masked]>
writes:

> From: Eslam reda ragheb <[email-masked]>
>
> Introduce an explicit repo_info context for the repo info codepath
> and thread it through value lookups and field printing.
>
> This removes direct coupling from these helpers to ad-hoc
> repository globals and makes key retrieval logic easier to extend
> safely.

The above makes it sound as if you are improving existing code where
existing helper functions are already making ad-hoc and unsafe
access to global variables, but I somehow doubt that is what is
happening here.

What does "these helpers" exactly refer to in this sentence?  The
ones you will introduce in patch 02/10?

    Currently helper functions of get_value_fn type receives the
    output buffer and repository instance as parameters, but we are
    about to teach "repo info" to retrieve information that requires
    to know more than just the repository (e.g., the prefix given
    when the command was invoked).  Introduce a new "repo_info"
    structure and update get_value_fn to take it as a parameter.

or something?

> Also teach git repo info to accept category names (for example,
> layout) and expand them to matching key.* entries in request
> order.

That smells like an unrelated change.  Wouldn't it better to do so
in a subsequent patch, so that each step will concentrate on doing
one thing and one thing well?