git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: phillip.wood123@gmail.com
To: Tamir Duberstein <tamird@fuseenergy.com>, phillip.wood@dunelm.org.uk
Cc: Eric Sunshine <sunshine@sunshineco.com>,
	git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: bug report: spurious "cannot delete branch '%s' used by worktree"
Date: Tue, 2 Apr 2024 16:15:37 +0100	[thread overview]
Message-ID: <566bc6ac-d4d6-45e2-9875-575e187280a7@gmail.com> (raw)
In-Reply-To: <CAEYvaskG0BBVr+nsQ+iof=AXu3dcQHx0aRRrKRrf8e_NFANL9A@mail.gmail.com>

On 02/04/2024 12:56, Tamir Duberstein wrote:

[cc'ing Christian who knows more about "git bisect" than me]

> On Tue, Apr 2, 2024 at 12:29 PM <phillip.wood123@gmail.com> wrote:
>> 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 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.

Oh good I'm glad we've found the problem.

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

Yes, there was some discussion about that relatively recently when the 
message was changed to say "in use" rather than "checked out". Adding 
the appropriate command name into the message would help.

When bisecting "git switch" prints a warning but still switches 
branches, "git checkout" performs the checkout with no warning. I wonder 
if (a) "git switch" should refuse to run without "--detach" when there 
is a bisection in progress and (b) if "git bisect" could be more helpful 
when it finds the broken commit by telling the user that they should run 
"git bisect reset" to clean up.

Best Wishes

Phillip


      reply	other threads:[~2024-04-02 15:15 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
2024-04-02 15:15               ` phillip.wood123 [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

  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=566bc6ac-d4d6-45e2-9875-575e187280a7@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sunshine@sunshineco.com \
    --cc=tamird@fuseenergy.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).