From: Junio C Hamano <gitster@pobox.com>
To: Caleb White <cdwhite3@pm.me>
Cc: rsbecker@nexbridge.com,
'Eric Sunshine' <sunshine@sunshineco.com>,
'shejialuo' <shejialuo@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH v2 0/3] Ensure unique worktree ids across repositories
Date: Tue, 03 Dec 2024 13:37:59 +0900 [thread overview]
Message-ID: <xmqqiks1e5zs.fsf@gitster.g> (raw)
In-Reply-To: <D61R68MFWDIU.12PI8AA8S3G86@pm.me> (Caleb White's message of "Tue, 03 Dec 2024 03:42:02 +0000")
Caleb White <cdwhite3@pm.me> writes:
> You're correct in that the worktree ids are only relevant within the
> context of a single repository. However, I've already demonstrated that
> it's possible for a repository to "repair" (i.e., take over) a worktree
> belonging to another repository if the ids match (inferred backlink).
I know. But isn't that a BUG in the code that "repair"s? If a
worktree had a name 'develop' that was OK in the context of
repository X, and when you "repair" things so that it becomes one of
the worktrees of a different repository Y, the "repair" operation is
what MUST make sure that the worktree that used to be known as
'develop' to repository X does not interfere any existing worktrees
that is attached to the repository Y. If the repository Y already
had a worktree called 'develop', the "repair" operation must make
sure that the newly adopted worktree would get a different name.
But then, the concern is exactly the same when you try to create a
new worktree (no "repair" involved) in repository Y and try to give
it a name 'develop', isn't it? You have to make sure that there is
no worktree that is called 'develop' in the repository Y before
giving it the name. Is it broken? If not, what are we doing to
make sure we won't give the name 'develop' to the new worktree?
Certainly we do not use any hash or random number for that, so why
does this new series need to use a random number?
next prev parent reply other threads:[~2024-12-03 4:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 22:37 [PATCH v2 0/3] Ensure unique worktree ids across repositories Caleb White
2024-11-29 22:37 ` [PATCH v2 1/3] worktree: add worktree with unique suffix Caleb White
2024-11-29 22:37 ` [PATCH v2 2/3] worktree: rename worktree id during worktree move Caleb White
2024-11-29 22:37 ` [PATCH v2 3/3] worktree: add id to `worktree list` output Caleb White
2024-11-29 22:54 ` [PATCH v2 0/3] Ensure unique worktree ids across repositories rsbecker
2024-11-29 23:13 ` Caleb White
2024-11-29 23:17 ` rsbecker
2024-11-29 23:29 ` Caleb White
2024-11-29 23:44 ` rsbecker
2024-11-30 0:08 ` Caleb White
2024-11-30 0:38 ` rsbecker
2024-11-30 16:08 ` Caleb White
2024-11-30 17:16 ` rsbecker
2024-12-02 2:00 ` Junio C Hamano
2024-12-02 11:46 ` shejialuo
2024-12-03 0:46 ` Junio C Hamano
2024-12-03 0:56 ` Eric Sunshine
2024-12-03 1:46 ` Junio C Hamano
2024-12-03 1:53 ` rsbecker
2024-12-03 2:30 ` Junio C Hamano
2024-12-03 3:42 ` Caleb White
2024-12-03 4:37 ` Junio C Hamano [this message]
2024-12-03 5:31 ` Caleb White
2024-12-03 1:24 ` shejialuo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqiks1e5zs.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=cdwhite3@pm.me \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
--cc=shejialuo@gmail.com \
--cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).