From: Ben Knoble <ben.knoble@gmail.com>
To: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Cc: Patrick Steinhardt <ps@pks.im>,
Junio C Hamano <gitster@pobox.com>,
Josh Soref <gitgitgadget@gmail.com>,
git@vger.kernel.org, Sam Bostock <sam.bostock@shopify.com>
Subject: Re: [PATCH] refs: support migration with worktrees
Date: Wed, 29 Oct 2025 12:22:18 -0400 [thread overview]
Message-ID: <598941EF-43F6-4642-B665-C0D65C5CDABB@gmail.com> (raw)
In-Reply-To: <85d6fdcc-cee3-448a-8bda-72791f342be3@app.fastmail.com>
> Le 29 oct. 2025 à 07:37, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> a écrit :
>
> On Wed, Oct 29, 2025, at 11:10, Patrick Steinhardt wrote:
>>> On Tue, Oct 28, 2025 at 09:00:43AM -0700, Junio C Hamano wrote:
>>> Patrick Steinhardt <ps@pks.im> writes:
[snip]
>>> * If "you must do so from the primary worktree and we convert all
>>> the worktrees attached to the same repository" is the only mode
>>> of operation we support (which by the way I have no problem
>>> with---the first bullet point above was asking question, not
>>> suggesting change of design), then would it be easier for the
>>> user to use if the command noticed that it is not in the primary
>>> worktree and switched to it for the user, instead of complaining
>>> and failing?
>>
>> I'm not sure. The question is whether the user recognizes that migrating
>> references in the worktree would also migrate references in the main
>> repository. It might be surprising behaviour if we did that without
>> asking.
>
> On the contrary, as a user I think it mattering what worktree I run this
> command from sounds very weird. (But again I can tolerate it requiring
> me to run it from the main worktree if there are technical difficulties/
> limitations. But using different backends for different
> worktrees is very weird, again.)
[snip]
The fewer concepts we ask a user to manage at a time, likely the better. In this case, “migrate the refs” should probably just work. While things are experimental, rough edges are more tolerable of course, but as we are lifting limitations towards making things official I think polishing such edges is a good idea.
In sum, it can be done later, but I think automatically changing the process directory to the main worktree and carrying on is fine. The curious folks would even see that under the TRACE output ;)
next prev parent reply other threads:[~2025-10-29 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 18:26 [PATCH] refs: support migration with worktrees Sam Bostock via GitGitGadget
2025-10-28 7:28 ` Patrick Steinhardt
2025-10-28 16:00 ` Junio C Hamano
2025-10-29 10:10 ` Patrick Steinhardt
2025-10-29 11:33 ` Kristoffer Haugsbakk
2025-10-29 16:22 ` Ben Knoble [this message]
2025-10-30 6:37 ` Patrick Steinhardt
2025-10-29 14:47 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=598941EF-43F6-4642-B665-C0D65C5CDABB@gmail.com \
--to=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=ps@pks.im \
--cc=sam.bostock@shopify.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).