Subject: Re: [PATCH v2 0/3] Ensure unique worktree ids across repositories

From: Junio C Hamano <[email-masked]>
Date: Tue, 03 Dec 2024 11:30:34 +0900

<[email-masked]> writes:

>>Ah, yes, that exposes (and has to expose) the worktree ID.  It still does
> not have to
>>be unique across repositories (only has to unique among the worktrees that
> share
>>the same single repository).
>
> I might be mistaken, but I think the intent of the worktree series being
> discussed
> deliberately wanted the worktree ID to be globally unique on a specific
> machine.

That is my understanding, but I do not understand why such a
uniqueness is needed.  Repositories are not even aware of other
repositories, in any sense to make it matter to know worktree IDs
other repositories are using.  Until there is an attempt to link a
worktree that used to belong to a repository to a different
repository, that is.  At that time, names must be made unique among
worktrees that belong to the adopting repository, of course, but the
names used in the original repository for its worktrees would not
matter at that point, I would think.

> I might be wrong (hoping I am). The original author should comment on this.

Sure.  Thanks for commenting.