From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Matt Hickford <matt.hickford@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Feature request: highlight local worktree in `worktree list`
Date: Wed, 20 Mar 2024 07:38:57 -0700 [thread overview]
Message-ID: <xmqqedc5hsse.fsf@gitster.g> (raw)
In-Reply-To: <20240320100232.GB2446185@coredump.intra.peff.net> (Jeff King's message of "Wed, 20 Mar 2024 06:02:32 -0400")
Jeff King <peff@peff.net> 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
next prev parent reply other threads:[~2024-03-20 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 8:00 Feature request: highlight local worktree in `worktree list` Matt Hickford
2024-03-20 10:02 ` Jeff King
2024-03-20 14:38 ` Junio C Hamano [this message]
2024-03-20 20:39 ` Jeff King
2024-03-21 13:00 ` Matt Hickford
2024-03-20 22:24 ` Rubén Justo
2024-03-21 0:53 ` Chris Torek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqedc5hsse.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=matt.hickford@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.