Re: [PATCH v1] builtin/mktree: remove USE_THE_REPOSITORY_VARIABLE
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2026, 20:20 UTC
- Message-ID
- <xmqqh5qj4h1z.fsf@gitster.g>
- In-Reply-To
- <e448f98d-58be-409d-9ff2-ae45442dbded@malon.dev>
Tian Yuchen <cat@malon.dev> writes:
Show 16 quoted lines
> 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?