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

Re: [PATCH 1/2] unpack-trees: lose USE_THE_REPOSITORY

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2026, 16:13 UTC
Message-ID
<xmqqse18u0jw.fsf@gitster.g>
In-Reply-To
<avLCDTHuScp4iLyj@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> All I'm pointing out is that there are cases where we could be as
> defensive as everywhere else if we started passing down the options to
> calling contexts that don't have it yet.

OK, that does make sense, but I suspect the current helper functions that do not get unpack_opt do not because they do not have a reason to access anything in it. We could throw "struct repository *" into that struct and use that one (ignoring the one in the istates).

I however think that would be a separate clean-up.
Thanks.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 7 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.