Re: Feature request: highlight local worktree in `worktree list`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> I'm not sure if this is a dumb idea or not, but: what if git-branch
> learned to display branches associated with worktrees (just like "-r"
> lists remote branches, etc).

A branch usually, but not necessarily, is checked out in at most one
worktree, so the display may become a bit more cluttered when more
than one checks out the same branch, but it is similar to how a commit
pointed at by multiple refs are shown with --decorate, so I do not think
it is such a huge deal.

> I think the only thing it wouldn't do is show worktrees that are
> detached from any branch at all. I'm not sure if that's important to
> your workflow or not.

If such a mode in "git branch --list" were written, I would imagine
that the output from such a mode will include detached HEAD from
other worktrees as well.  Perhaps something like this?

    $ git branch --list --worktrees
      (HEAD detached from ffa877cd2f, checked out in worktree 'buildtest')
      jch (checked out in worktree 'integration')
      maint
    * master (checked out in the primary worktree)
      next
      seen
      jk/branch-list-with-worktree





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux