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

Re: [PATCH] worktree: add: introduce the --name option

From
ATAntoine Tenart <antoine.tenart@ack.tf>
Date
Jul 20, 2016, 06:41 UTC
Message-ID
<20160720064120.GE28551@kwain>
In-Reply-To
<CAPig+cQ5eGoNFa90__ay+Y7AMP5Zd1VUDXWFCfU1-XX3oEYAkg@mail.gmail.com>
Hello Eric,
On Tue, Jul 19, 2016 at 02:52:42PM -0400, Eric Sunshine wrote:
Show 26 quoted lines
> On Tue, Jul 19, 2016 at 2:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > Antoine Tenart <antoine.tenart@ack.tf> writes:
> >> Adds a --name option allowing to specify the name of a worktree when
> >> creating it. This allows to have multiple worktrees in directories
> >> having the same name (e.g. project0/foo, project1/foo etc...). This
> >> commit keeps the previous behaviour by making it the default value, i.e.
> >> by using $(basename <path>) as the worktree name when the --name option
> >> isn't used.
> >
> > Hmm, is this related to an earlier discussion
> >
> >     https://public-inbox.org/git/20160625051548.95564-1-barret%40brennie.ca/
> >
> > in any way, or is it an independent invention?
> >
> > The conclusion of that discussion thread was roughly "users
> > shouldn't even _care_ about the name, and if they have to use name
> > to identify the worktrees to do certain things right now, reducing
> > the need for such 'certain things', not making it easy to give a
> > user-defined name to a worktree, is the way to go", IIRC.
> 
> Yes, that's correct. The discussion wandered a bit before starting to
> converge at [1] and concluding at [2].
> 
> [1]: https://public-inbox.org/git/CAPig%2BcRNUZZBw%3DF-Q2f3Ehc-8T2iBp4kvDusNRGv4ea5nihQVQ%40mail.gmail.com/
> [2]: https://public-inbox.org/git/CAPig%2BcSEwib1iFyWE5h8-qTbsAC%2BzsaSDSYQnv6otWoOOjWAeA%40mail.gmail.com/

Thanks for the links, I've had a look at the discussion. The problem that raised it was a bit different: it was about reorganizing projects and directory trees, no about creating a new worktree with the same basename as an existing one. I've also had a look at 080739b, introducing find_worktree(), but I don't think that would solve the issue either.

So we've left with two solutions: being able to specify the worktree name or having an arbitrary ID (plus some modifications to `git worktree list`) as you proposed. I guess you prefer the later solution. Is there any plan to do this, or anything in progress?

Thanks,
-- 
Antoine
Previous: Eric Sunshine
Message 14 of 14 in “worktree: add: introduce the --name option”
  1. worktree: add: introduce the --name optionAntoine Tenart, Jul 19, 2016
  2. Junio C HamanoJul 19, 2016
  3. Duy NguyenJul 19, 2016
  4. Antoine TenartJul 19, 2016
  5. Duy NguyenJul 19, 2016
  6. Eric SunshineJul 19, 2016
  7. Antoine TenartJul 19, 2016
  8. Duy NguyenJul 20, 2016
  9. Antoine TenartJul 20, 2016
  10. Antoine TenartJul 19, 2016
  11. Junio C HamanoJul 19, 2016
  12. Antoine TenartJul 19, 2016
  13. Eric SunshineJul 19, 2016
  14. Antoine TenartJul 20, 2016

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.