Re: [PATCH 0/4] wean start_command() off the_repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 11, 2026, 19:35 UTC
- Message-ID
- <xmqqjyvinoqp.fsf@gitster.g>
- In-Reply-To
- <041604ef-0bdb-4c40-a9e1-60c38ae664cb@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 16 quoted lines
> On 3/11/26 4:19 PM, Burak Kaan Karaçay wrote: >> >> start_command() relies on the_repository due to the 'close_object_store' >> flag in 'struct child_process'. Introduce repo_start_command() to allow >> working with arbitrary repositories. Turn start_command() into a macro >> that wraps repo_start_command() and migrate the existing callers with a >> cocci script. > > Good idea to expose this hidden dependency. It's different from the > other repo_* functions, though, in that most callers can safely pass > NULL as repo because they don't set close_object_store. > > Only gc, pull and auto-maintenance set close_object_store. If we > changed them to set a pointer to the object store they want to have > closed instead of a binary flag then we could leave the other callers > unchanged.
You solved my "don't we need to know where we are coming from, in addition to where we are going?" question elegantly.
Thanks.