From: Eric Sunshine <sunshine@sunshineco.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 3/3] worktree prune: improve prune logic when worktree is moved
Date: Sun, 18 Mar 2018 18:59:28 -0400 [thread overview]
Message-ID: <CAPig+cTwFCtNNJomC-8RHNYErkbZ821hm3mWGBXATedEcy44Jg@mail.gmail.com> (raw)
In-Reply-To: <20180315164412.14697-4-pclouds@gmail.com>
On Thu, Mar 15, 2018 at 12:44 PM, Nguyễn Thái Ngọc Duy
<pclouds@gmail.com> wrote:
> Automatic detection of worktree relocation by a user (via 'mv', for
> instance) was removed by 618244e160 (worktree: stop supporting moving
> worktrees manually - 2016-01-22). Prior to that,
> .git/worktrees/<tag>/gitdir was updated whenever the worktree was
> accessed in order to let the pruning logic know that the worktree was
> "active" even if it disappeared for a while (due to being located on
> removable media, for instance).
This is my fault since I suggested this rewrite[1], but other
documentation calls this <id>, not <tag>, so: s/tag/id/
(Again, not worth a re-roll; perhaps Junio can tweak it when queuing.)
> "git worktree move" has come so we don't really need this, but since
> it's easy to do, perhaps we could keep supporting manual worktree move
> a bit longer. Notice that when a worktree is active, the "index" file
> should be updated pretty often in common case. The logic is updated to
> check for index mtime to see if the worktree is alive.
>
> The old logic of checking gitdir's mtime is dropped because nobody
> updates it anyway. The new corner case is, if the index file does not
> exist, we immediately remove the stale worktree. But if the "index"
> file does not exist, you may have a bigger problem.
Makes sense.
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
[1]: https://public-inbox.org/git/CAPig+cQG8yEqunNUjoEAPY-W9+TtzWADhgjdL6udnyrG0YEOVg@mail.gmail.com/
next prev parent reply other threads:[~2018-03-18 22:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-03 3:39 [PATCH 0/3] git worktree prune improvements Nguyễn Thái Ngọc Duy
2018-03-03 3:39 ` [PATCH 1/3] gc.txt: more details about what gc does Nguyễn Thái Ngọc Duy
2018-03-03 9:14 ` Eric Sunshine
2018-03-03 3:39 ` [PATCH 2/3] worktree: delete dead code Nguyễn Thái Ngọc Duy
2018-03-03 3:39 ` [PATCH 3/3] worktree prune: improve prune logic when worktree is moved Nguyễn Thái Ngọc Duy
2018-03-03 9:30 ` Eric Sunshine
2018-03-03 14:21 ` [PATCH 0/3] git worktree prune improvements Randall S. Becker
2018-03-05 12:16 ` Duy Nguyen
2018-03-15 16:44 ` [PATCH v2 " Nguyễn Thái Ngọc Duy
2018-03-15 16:44 ` [PATCH v2 1/3] gc.txt: more details about what gc does Nguyễn Thái Ngọc Duy
2018-03-15 16:44 ` [PATCH v2 2/3] worktree: delete dead code Nguyễn Thái Ngọc Duy
2018-03-18 22:51 ` Eric Sunshine
2018-03-15 16:44 ` [PATCH v2 3/3] worktree prune: improve prune logic when worktree is moved Nguyễn Thái Ngọc Duy
2018-03-18 22:59 ` Eric Sunshine [this message]
2018-03-18 23:02 ` [PATCH v2 0/3] git worktree prune improvements 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPig+cTwFCtNNJomC-8RHNYErkbZ821hm3mWGBXATedEcy44Jg@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).