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

Re: [PATCH v6 00/11] refs: fix "onbranch" conditions

From
Jeff King <peff@peff.net>
Date
Jun 26, 2026, 05:06 UTC
Message-ID
<20260626050608.GA3138423@coredump.intra.peff.net>
In-Reply-To
<20260625-b4-pks-refs-avoid-chdir-notify-reparent-v6-0-41fbca3cf5e3@pks.im>
On Thu, Jun 25, 2026 at 11:19:58AM +0200, Patrick Steinhardt wrote:
Show 5 quoted lines
>   - Fix the "onbranch" recursion properly: instead of papering over the
>     issue, this series now refactors reference store initialization to
>     not read any configuration at all anymore. Instead, the config is
>     now parsed lazily. This fixes the recursion, but also makes us
>     respect configuration guarded by "onbranch" conditions properly.

Sorry, I was offline and missed reviewing some of the intermediate stages.

The approach you take in v6 looks good to me, and I'm glad the result does not look too painful to maintain. If we ever add a config option that is absolutely required for initializing the reading side of the backends, we'll be back to our chicken-and-egg problem. But I won't be surprised if that never happens, and if it does, we can decide on the user-visible interaction with onbranch includes then (and whatever the result is, document it).

Thanks for taking the time to re-work all of this.
-Peff
Previous: Patrick Steinhardt
Message 17 of 17 in “refs: fix "onbranch" conditions”
  1. 00/11 refs: fix "onbranch" conditionsPatrick Steinhardt, Jun 25, 2026
  2. 01/11 setup: inline `check_and_apply_repository_format()`Patrick Steinhardt, Jun 25, 2026
  3. 02/11 setup: stop applying repository format twicePatrick Steinhardt, Jun 25, 2026
  4. 03/11 setup: don't apply "GIT_REFERENCE_BACKEND" without a repositoryPatrick Steinhardt, Jun 25, 2026
  5. 04/11 refs: unregister reference stores from "chdir_notify"Patrick Steinhardt, Jun 25, 2026
  6. 05/11 chdir-notify: drop unused `chdir_notify_reparent()`Patrick Steinhardt, Jun 25, 2026
  7. 06/11 repository: free main reference databasePatrick Steinhardt, Jun 25, 2026
  8. 07/11 refs: move parsing of "core.logAllRefUpdates" back into ref storesPatrick Steinhardt, Jun 25, 2026
  9. 08/11 refs/files: lazy-load configuration to fix chicken-and-eggPatrick Steinhardt, Jun 25, 2026
  10. 09/11 reftable: split up write optionsPatrick Steinhardt, Jun 25, 2026
  11. 10/11 refs/reftable: lazy-load configuration to fix chicken-and-eggPatrick Steinhardt, Jun 25, 2026
  12. 11/11 refs: protect against chicken-and-egg recursionPatrick Steinhardt, Jun 25, 2026
  13. Justin ToblerJun 25, 2026
  14. Junio C HamanoJun 25, 2026
  15. Junio C HamanoJun 26, 2026
  16. Patrick SteinhardtJun 26, 2026
  17. Jeff KingJun 26, 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.