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

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

From
Duy Nguyen <pclouds@gmail.com>
Date
Jul 19, 2016, 19:04 UTC
Message-ID
<CACsJy8AkpBmNS0nOoKX7PUYhp9kKgvH=K2gpCnq+sR++ZmDAgQ@mail.gmail.com>
In-Reply-To
<20160719185452.GB28551@kwain>
On Tue, Jul 19, 2016 at 8:54 PM, Antoine Tenart <antoine.tenart@ack.tf> wrote:
Show 11 quoted lines
> On Tue, Jul 19, 2016 at 08:23:58PM +0200, Duy Nguyen wrote:
>> On Tue, Jul 19, 2016 at 8:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>> 080739b (worktree.c: find_worktree() search by path suffix -
>> 2016-06-13) from 'next' should help identify worktrees in this case by
>> specifying 'project0/foo', 'project1/foo'... Granted it's not fun to
>> type all that when 'project0/foo' is something long, and bash
>> completion probably does not help much either.
>
> So with this I'll be able to create new worktrees, using paths having
> the same basename, but in different let's say "project directories"?

Well, internal name is still out of your control, but if you want to do something to a worktree you can say "do project0/foo". With 'next' those verbs can be lock and unlock. We probably can make 'worktree list' take filter and show just one worktree (and just add "git worktree show" for that).

Show 7 quoted lines
>> Note that we may need a unique name elsewhere too, e.g.
>> refs/worktrees/xyz (even though we haven't settled on this yet). Then
>> xyz would be more exposed to the user and an easily recognizable name
>> would be a good thing.
>
> Having a recognisable name surely is a good thing, when performing some
> (rare) manual operations.

What I had in mind was "git log --decorate=more-than-full", foo/HEAD and foo1/HEAD do not look as good as project0/HEAD and project1/HEAD (*)

> Like moving a worktree (or is there a command for this?)

Don't touch it. I've been waiting patiently for that patch series to be reviewed :)

-- 
Duy
Previous: Antoine TenartNext: Eric Sunshine
Message 5 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.