git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Burak Kaan KaraçayNext: Junio C Hamano
Message 10 of 18 in “wean start_command() off the_repository”
  1. 0/4 wean start_command() off the_repositoryBurak Kaan Karaçay, Mar 11, 2026
  2. 1/4 run-command: add repo_start_command()Burak Kaan Karaçay, Mar 11, 2026
  3. 2/4 run-command: use repo_start_command() in strict callersBurak Kaan Karaçay, Mar 11, 2026
  4. Junio C HamanoMar 11, 2026
  5. 3/4 run-command: redefine start_command() as a wrapper macroBurak Kaan Karaçay, Mar 11, 2026
  6. 4/4 cocci: convert start_command() to repo_start_command()Burak Kaan Karaçay, Mar 11, 2026
  7. René ScharfeMar 11, 2026
  8. Jeff KingMar 11, 2026
  9. Burak Kaan KaraçayMar 11, 2026
  10. Junio C HamanoMar 11, 2026
  11. Junio C HamanoMar 11, 2026
  12. run-command: wean start_command() off the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  13. Patrick SteinhardtMar 12, 2026
  14. 0/2 run-command: stop using the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  15. 1/2 run-command: wean start_command() off the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  16. 2/2 run-command: wean auto_maintenance() functions off the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  17. Junio C HamanoMar 12, 2026
  18. Patrick SteinhardtMar 13, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.