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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 3, 2024, 02:30 UTC
Message-ID
<xmqqiks1fqgl.fsf@gitster.g>
In-Reply-To
<025b01db4526$3b05ef00$b111cd00$@nexbridge.com>
<rsbecker@nexbridge.com> writes:
Show 10 quoted lines
>>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.
Previous: rsbecker@nexbridge.comNext: Caleb White
Message 20 of 24 in “Ensure unique worktree ids across repositories”
  1. 0/3 Ensure unique worktree ids across repositoriesCaleb White, Nov 29, 2024
  2. 1/3 worktree: add worktree with unique suffixCaleb White, Nov 29, 2024
  3. 2/3 worktree: rename worktree id during worktree moveCaleb White, Nov 29, 2024
  4. 3/3 worktree: add id to `worktree list` outputCaleb White, Nov 29, 2024
  5. rsbecker@nexbridge.comNov 29, 2024
  6. Caleb WhiteNov 29, 2024
  7. rsbecker@nexbridge.comNov 29, 2024
  8. Caleb WhiteNov 29, 2024
  9. rsbecker@nexbridge.comNov 29, 2024
  10. Caleb WhiteNov 30, 2024
  11. rsbecker@nexbridge.comNov 30, 2024
  12. Caleb WhiteNov 30, 2024
  13. rsbecker@nexbridge.comNov 30, 2024
  14. Junio C HamanoDec 2, 2024
  15. shejialuoDec 2, 2024
  16. Junio C HamanoDec 3, 2024
  17. Eric SunshineDec 3, 2024
  18. Junio C HamanoDec 3, 2024
  19. rsbecker@nexbridge.comDec 3, 2024
  20. Junio C HamanoDec 3, 2024
  21. Caleb WhiteDec 3, 2024
  22. Junio C HamanoDec 3, 2024
  23. Caleb WhiteDec 3, 2024
  24. shejialuoDec 3, 2024

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.