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

[PATCH v2 0/2] unpack-trees.c w/o the_repository

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 9, 2026, 20:54 UTC
Message-ID
<20261109205438.369060-1-gitster@pobox.com>
In-Reply-To
<xmqqtsltbfdv.fsf@gitster.g>

unpack_trees() API serves as low-level functions to implement merge and checkout. It heavily relies on the_repository, making it clear it only works with that repository instance. We however can use the repository instance pointed at by key data structures passed throughout the callchain.

This is almost the exact copy of what I have at 
    https://lore.kernel.org/git/xmqqtsltbfdv.fsf@gitster.g/
The only changes since that version are removals of two blank lines.
 1/2: unpack-trees: lose USE_THE_REPOSITORY
 2/2: unpack-trees: consistently use "struct index_state *istate"
 unpack-trees.c | 180 ++++++++++++++++++++++++++++++++-----------------
 1 file changed, 118 insertions(+), 62 deletions(-)
-- 
2.56.0-626-gaba6dc7e00
Previous: Derrick StoleeNext: Junio C Hamano
Message 10 of 15 in “unpack-trees: lose USE_THE_REPOSITORY”
  1. 1/2 unpack-trees: lose USE_THE_REPOSITORYJunio C Hamano, Nov 7, 2026
  2. 2/2 unpack-trees: consistently use "struct index_state *istate"Junio C Hamano, Nov 7, 2026
  3. Derrick StoleeNov 9, 2026
  4. Patrick SteinhardtNov 9, 2026
  5. Junio C HamanoNov 9, 2026
  6. Patrick SteinhardtNov 10, 2026
  7. Junio C HamanoNov 10, 2026
  8. Patrick SteinhardtNov 10, 2026
  9. Derrick StoleeNov 9, 2026
  10. 0/2 unpack-trees.c w/o the_repositoryJunio C Hamano, Nov 9, 2026
  11. 1/2 unpack-trees: lose USE_THE_REPOSITORYJunio C Hamano, Nov 9, 2026
  12. 2/2 unpack-trees: consistently use "struct index_state *istate"Junio C Hamano, Nov 9, 2026
  13. Derrick StoleeNov 10, 2026
  14. Junio C HamanoNov 10, 2026
  15. Patrick SteinhardtNov 11, 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.