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

Re: [PATCH] refs: support migration with worktrees

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 29, 2025, 14:47 UTC
Message-ID
<xmqqzf99ahop.fsf@gitster.g>
In-Reply-To
<aQHoKXtrbDx6eNpH@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> The problem we have here is backwards compatibility. Right now we assume
> that `extensions.refStorage` applies to all worktrees, so if we wanted
> to change it like you propose then we'd have to introduce a backwards
> incompatible change.

That settles it. If we have long declared that a set of worktrees attached to a repository share the same backend, then we do not have to worry about overlaying refs stored in a different backend on top of the base set of refs at all. That simplifies things a lot, I would imagine.

> So with the above reasoning I'm not sure I'd call this a limitation.
> It's rather a mechanism to protect users from unexpected consequences.

The need for that mechanism would imply that it may not be clear to the users that worktrees of the same repository must use the same ref backend. Some education is needed, and erroring this operation out may be one of the ways to give that, perhaps.

Thanks.
Previous: Patrick Steinhardt
Message 8 of 8 in “refs: support migration with worktrees”
  1. refs: support migration with worktreesSam Bostock via GitGitGadget, Oct 27, 2025
  2. Patrick SteinhardtOct 28, 2025
  3. Junio C HamanoOct 28, 2025
  4. Patrick SteinhardtOct 29, 2025
  5. Kristoffer HaugsbakkOct 29, 2025
  6. Ben KnobleOct 29, 2025
  7. Patrick SteinhardtOct 30, 2025
  8. Junio C HamanoOct 29, 2025

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.