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

Re: [PATCH v2] odb: do not list our own refs as alternate refs in the quarantine

From
Kristofer Karlsson <krka@spotify.com>
Date
Nov 4, 2026, 10:32 UTC
Message-ID
<CAL71e4M0t2ZgbqOd4MXeX3vH2W7pPRSMg+8i8epXYbh5-5t8Hw@mail.gmail.com>
In-Reply-To
<aupPATAGBWH1RIe6@denethor>
On Tue, 3 Nov 2026 at 22:53, Justin Tobler <jltobler@gmail.com> wrote:
Show 19 quoted lines
>
> Regarding the fix proposed in this patch, I'm not quite sure this is
> really the right layer to address the problem. The root of the problem
> is that we are swapping around the "real" and quarantine object
> directories to facilitate writing to the "files" ODB transaction. IMO,
> this is already rather fragile. So I do agree with Patrick that I think
> the better long-term fix is to stop modifying the primary object
> directory altogether and instead propagate some context about the
> pending transaction via environment variables to the child process that
> it can use to reconstruct the proper environment. This is certainly a
> more involved change, but something that I've been wanting to do for a
> while now regardless.
>
> If we are interested in a more simple fix for the short-term, we could
> adapt `odb_transaction_env()` to have a "read-only" mode flag that does
> not modify the primary object directory and only appends the quarantine
> directory as an alternate. For the connectivity check in
> git-receive-pack(1) we don't write any object anyways, so configuring
> the environment in this manner should be sufficient to fix the issue.
I agree with that long-term direction.  What do you think we should
do for the short term?  I see a few options:
 1. A smaller, more focused patch in the alternate refs code, as Peff
   suggested in the other message.
 2. Your read-only transaction environment for the connectivity check,
   (if you want to take that on, I would probably mess it up :-) ).
 3. Only a regression test for now, with the hidden refs case marked as
   test_expect_failure, so that we do not lose track of it.
 4. Or nothing, and wait for the long-term fix, as nobody seems to be
   hit hard by this at the moment.

Thanks, Kristofer

Previous: Justin ToblerNext: Justin Tobler
Message 16 of 20 in “odb: do not list our own refs as alternate refs in the quarantine”
  1. odb: do not list our own refs as alternate refs in the quarantineKristofer Karlsson via GitGitGadget, Oct 28, 2026
  2. Justin ToblerOct 29, 2026
  3. Kristofer KarlssonOct 30, 2026
  4. Junio C HamanoOct 29, 2026
  5. Kristofer KarlssonOct 30, 2026
  6. Junio C HamanoOct 30, 2026
  7. Jeff KingOct 30, 2026
  8. odb: do not list our own refs as alternate refs in the quarantineKristofer Karlsson via GitGitGadget, Nov 2, 2026
  9. Junio C HamanoNov 3, 2026
  10. Junio C HamanoNov 3, 2026
  11. Kristofer KarlssonNov 3, 2026
  12. Patrick SteinhardtNov 3, 2026
  13. Kristofer KarlssonNov 3, 2026
  14. Patrick SteinhardtNov 3, 2026
  15. Justin ToblerNov 3, 2026
  16. Kristofer KarlssonNov 4, 2026
  17. Justin ToblerNov 4, 2026
  18. Jeff KingNov 4, 2026
  19. Kristofer KarlssonNov 4, 2026
  20. Junio C HamanoNov 4, 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.