git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Tamir Duberstein <tamird@fuseenergy.com>
To: phillip.wood@dunelm.org.uk
Cc: Eric Sunshine <sunshine@sunshineco.com>, git@vger.kernel.org
Subject: Re: bug report: spurious "cannot delete branch '%s' used by worktree"
Date: Tue, 2 Apr 2024 12:56:53 +0100	[thread overview]
Message-ID: <CAEYvaskG0BBVr+nsQ+iof=AXu3dcQHx0aRRrKRrf8e_NFANL9A@mail.gmail.com> (raw)
In-Reply-To: <740d1f1a-40ce-4714-91bd-1ba448e9d672@gmail.com>

On Tue, Apr 2, 2024 at 12:29 PM <phillip.wood123@gmail.com> wrote:
>
> Hi Tamir
>
> On 02/04/2024 11:26, Tamir Duberstein wrote:
> > On Tue, Apr 2, 2024 at 11:10 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
> >> On 31/03/2024 07:49, Eric Sunshine wrote:
> >> Thanks Eric. I'd have thought that "git worktree list" would say
> >> something about the branch being rebased if there was enough state lying
> >> around to prevent the branch being deleted, but lets see. What does
> >>
> >>       ls $(git rev-parse --git-path rebase-merge) $(git rev-parse
> >> --git-path rebase-apply)
> >>
> >> show when you run it in <my source dir>? Also is <my source dir> the
> >> only worktree?
> >
> > % ls $(git rev-parse --git-path rebase-merge) $(git rev-parse
> > --git-path rebase-apply)
> > ls: .git/rebase-apply: No such file or directory
> > ls: .git/rebase-merge: No such file or directory
>
> Thanks for trying that - at least we know it isn't a problem with
> rebase. Lets check if there is a stale bisect (sorry I forgot about that
> earlier). What do
>
>      cat .git/BISECT_START
>      ls .git | grep -i bisect
>
> show?

This was the culprit! There was indeed a ` .git/BISECT_START`
containing "cleanup". After deleting this file I am able to remove the
branch.

> > Yes, it's the only worktree.
> In that case can you check that
>
>      ls .git/worktrees
>
> fails because the directory is missing or shows an empty directory please.

% cat .git/worktrees

cat: .git/worktrees: No such file or directory

> Thanks
>
> Phillip

I guess the only action item would be to improve the error message.


  reply	other threads:[~2024-04-02 11:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 14:53 bug report: spurious "cannot delete branch '%s' used by worktree" Tamir Duberstein
2024-03-28 17:24 ` Eric Sunshine
2024-03-28 17:39   ` Tamir Duberstein
2024-03-31  6:49     ` Eric Sunshine
2024-03-31  7:45       ` Tamir Duberstein
2024-04-02 10:10       ` Phillip Wood
2024-04-02 10:26         ` Tamir Duberstein
2024-04-02 10:38           ` Kristoffer Haugsbakk
2024-04-02 11:28           ` phillip.wood123
2024-04-02 11:56             ` Tamir Duberstein [this message]
2024-04-02 15:15               ` phillip.wood123

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='CAEYvaskG0BBVr+nsQ+iof=AXu3dcQHx0aRRrKRrf8e_NFANL9A@mail.gmail.com' \
    --to=tamird@fuseenergy.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --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).