git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Git List" <git@vger.kernel.org>
Subject: Re: [RFC PATCH] builtin/worktree: enhance worktree removal
Date: Wed, 22 Nov 2017 13:05:59 -0500	[thread overview]
Message-ID: <CAPig+cQF6V8HNdMX5AZbmz3_w2WhSfA4SFfNhQqxXBqPXTZL+w@mail.gmail.com> (raw)
In-Reply-To: <fee60b19-bc8e-bbd8-9f5d-347b2f941b2e@gmail.com>

On Wed, Nov 22, 2017 at 12:09 PM, Kaartic Sivaraam
<kaartic.sivaraam@gmail.com> wrote:
> On Wednesday 22 November 2017 03:07 AM, Eric Sunshine wrote:
>> [1]: Excerpt from:
>> https://public-inbox.org/git/CAPig+cTTrv2C7JLu1dr4+N8xo+7YQ+deiwLDA835wBGD6fhS1g@mail.gmail.com/
>>
>> Other information which would be nice to display for each worktree
>> [by the 'list' command] (possibly controlled by a --verbose flag):
>>
>>     * the checked out branch or detached head
>>     * whether it is locked
>>          - the lock reason (if available)
>>          - and whether the worktree is currently accessible
>>      * whether it can be pruned
>>          - and the prune reason if so
>
> It would nice to see this information. It would be very useful but 'list'
> doesn't seem to be the right sub-sub-command to give such information. Maybe
> there should be a new sub-sub-command named 'info' or something to give such
> information?

I'm perfectly fine with having 'git worktree list' provide this extra
information; that was the intention from the start. The "quick"
summary of all worktrees provided by 'git worktree list' is exactly
the sort of place where you're most likely to notice something
unexpected, such as the missing worktree directory. And, this extra
information doesn't have to be noisy:

--- 8< ---
% git worktree list
giggle     89ea799ffc [master]
../bobble  f172cb543d [feature1]  locked
../fumple  6453c84b7d (detached HEAD)  prunable
--- 8< ---

And, the verbose case:

--- 8< ---
% git worktree list -v
giggle     89ea799ffc [master]
../bobble  f172cb543d [feature1]
    locked: worktree on removable media
../fumple  6453c84b7d (detached HEAD)
    prunable: directory does not exist
--- 8< ---

An "info" command you speak of might also have value, but that's
orthogonal to this extra information that 'git worktree list' could
provide.

      reply	other threads:[~2017-11-22 18:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 15:09 [RFC PATCH] builtin/worktree: enhance worktree removal Kaartic Sivaraam
2017-11-21 21:37 ` Eric Sunshine
2017-11-22  2:12   ` Junio C Hamano
2017-11-22  3:14     ` Eric Sunshine
2017-11-22  3:23       ` Eric Sunshine
2017-11-22  3:55         ` Junio C Hamano
2017-11-22  4:37           ` Eric Sunshine
2017-11-22 17:51             ` Kaartic Sivaraam
2017-11-27 17:36               ` [RFC PATCH v2] " Kaartic Sivaraam
2017-11-28  3:02                 ` Junio C Hamano
2017-11-28  3:48                   ` Eric Sunshine
2017-11-28  4:04                     ` Junio C Hamano
2017-11-28  6:02                       ` Eric Sunshine
2017-11-28 16:46                       ` Kaartic Sivaraam
2017-11-22 17:13           ` [RFC PATCH] " Kaartic Sivaraam
2017-11-22 17:09   ` Kaartic Sivaraam
2017-11-22 18:05     ` Eric Sunshine [this message]

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=CAPig+cQF6V8HNdMX5AZbmz3_w2WhSfA4SFfNhQqxXBqPXTZL+w@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=pclouds@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).