Re: [PATCH v4 01/10] repo: teach info context and category keys
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 26, 2026, 23:21 UTC
- Message-ID
- <xmqqikbjum4y.fsf@gitster.g>
- In-Reply-To
- <99c8058298d403508ab2a23ed06c36b8707989d0.1772140487.git.gitgitgadget@gmail.com>
"Eslam reda ragheb via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> From: Eslam reda ragheb <eslam.reda.div@gmail.com> > > 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?