From: Rafael Silva <rafaeloliveira.cs@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH 0/2] teach `worktree list` to mark locked worktrees
Date: Sat, 10 Oct 2020 19:06:10 +0000 [thread overview]
Message-ID: <20201010190610.GA23099@contrib-buster.localdomain> (raw)
In-Reply-To: <CAPig+cR8D13cM8OewRVYfg7wNjVC05tVQw80-dm4B5XPmjHJWw@mail.gmail.com>
On Fri, Oct 09, 2020 at 06:50:02PM -0400, Eric Sunshine wrote:
> >
> > Sorry for the bit late response.
>
> Likewise.
>
> >
> > Doing a little investigation on the code, it seems the machinery for checking
> > whether a worktree is prunable it seems is already there implemented
> > on the `should_prune_worktree()`.
>
> Yes, when I mentioned that in [1], I envisioned
> should_prune_worktree() being moved from builtin/worktree.c to
> top-level worktree.c and possibly generalized a bit if necessary.
>
> One thing to note is that should_prune_worktree() is somewhat
> expensive, so we'd probably want to make determination of "prunable
> reason" lazy, much like the lock reason is retrieved lazily rather
> than doing it when get_worktrees() is called. Thus, like the lock
> reason, the prunable reason would be accessed indirectly via a
> function, say worktree_prunable_reason(), rather than directly from
> 'struct worktree'.
>
> [1]: https://lore.kernel.org/git/CAPig+cTTrv2C7JLu1dr4+N8xo+7YQ+deiwLDA835wBGD6fhS1g@mail.gmail.com/
Appreciate the tip, I will be working on the prunable annotations, verbose
and other information that was proposed previously for the "worktree list"
command.
> > Additionally, having the ability to see the annotation and the reason in
> > case you see the annotation seems like more complete work for the intention
> > of the patch.
> >
> > Unless you think that is better to start with the annotation, and some time
> > later addressing the other changes specified by [2].
>
> Whatever you feel comfortable tackling is fine. The simple "locked"
> annotation is nicely standalone, so it could be resubmitted with the
> changes suggested by reviewers, and graduate without waiting for the
> more complex tasks which could be done as follow-up series. Or, expand
> the current series to tackle verbose mode and/or prunable status or
> both or any combination.
>
Thanks. I've just resubmitted the "locked" annotation patch, as you said,
it's nice standalone and can be integrated and hopefully will be already
useful for other git users and soon (hopefully :) ) will submit new patches
for the other changes as proposed by [1].
[1]: https://lore.kernel.org/git/CAPig+cTTrv2C7JLu1dr4+N8xo+7YQ+deiwLDA835wBGD6fhS1g@mail.gmail.com/
next prev parent reply other threads:[~2020-10-10 22:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 15:49 [RFC PATCH 0/2] teach `worktree list` to mark locked worktrees Rafael Silva
2020-09-28 15:49 ` [RFC PATCH 1/2] worktree: teach `list` to mark locked worktree Rafael Silva
2020-09-28 21:37 ` Junio C Hamano
2020-09-29 21:36 ` Rafael Silva
2020-09-30 7:35 ` Eric Sunshine
2020-09-28 15:49 ` [RFC PATCH 2/2] t2402: add test to locked linked worktree marker Rafael Silva
2020-09-28 21:54 ` Junio C Hamano
2020-09-29 21:37 ` Rafael Silva
2020-09-30 8:06 ` Eric Sunshine
2020-09-28 21:19 ` [RFC PATCH 0/2] teach `worktree list` to mark locked worktrees Junio C Hamano
2020-09-29 21:35 ` Rafael Silva
2020-09-30 7:19 ` Eric Sunshine
2020-10-02 16:28 ` Rafael Silva
2020-10-09 22:50 ` Eric Sunshine
2020-10-10 19:06 ` Rafael Silva [this message]
2020-10-10 18:55 ` [PATCH v2 0/1] Teach "worktree list" to annotate " Rafael Silva
2020-10-10 18:55 ` [PATCH v2 1/1] worktree: teach `list` to annotate locked worktree Rafael Silva
2020-10-11 6:26 ` Eric Sunshine
2020-10-11 6:34 ` Eric Sunshine
2020-10-11 10:04 ` Rafael Silva
2020-10-11 10:11 ` [PATCH v3 0/1] Teach "worktree list" to annotate locked worktrees Rafael Silva
2020-10-11 10:11 ` [PATCH v3] worktree: teach `list` to annotate locked worktree Rafael Silva
2020-10-12 2:24 ` Eric Sunshine
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201010190610.GA23099@contrib-buster.localdomain \
--to=rafaeloliveira.cs@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).