Subject: Re: [PATCH v1] builtin/mktree: remove USE_THE_REPOSITORY_VARIABLE

From: Junio C Hamano <[email-masked]>
Date: Fri, 13 Mar 2026 13:20:56 -0700

Tian Yuchen <[email-masked]> writes:

> On 3/14/26 01:54, Junio C Hamano wrote:
>
>> I strongly disagree your idea that 'z' is more business logic than
>> 'h' is.  Both are equally relevant.
>
> Perhaps I didn't explain myself clearly :(
>
> I do understand that *currently* both are part of the business logic. 
> However, what puzzles me is: why is it written this way? Why isn't -h 
> intercepted at the outer global level, but instead handed off to a 
> function like parse_options() for interception?
>
> Is this due to historical reasons?
>
> Please forgive my slowness. I would appreciate it if you could offer 
> some guidance!

It is perfectly OK to be slow.  Spend enough time to study the code
so that you do not have to ask for forgiveness ;-)

In order to make a useful response to "-h", that business logic
needs to know what options are available and what argument they take
etc., which is already given to parse_options API.  What makes it
make any sense to split it to separate codepath?