From: Phillip Wood <phillip.wood123@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>, "René Scharfe" <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>, stsp <stsp2@yandex.ru>,
Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v2] branch: report active bisect run when rejecting delete
Date: Wed, 29 Jul 2026 16:22:22 +0100 [thread overview]
Message-ID: <3bdca3f4-affa-4443-afb6-fd7ca20cf012@gmail.com> (raw)
In-Reply-To: <xmqqbjbtyd80.fsf@gitster.g>
On 26/07/2026 16:36, Junio C Hamano wrote:
> René Scharfe <l.s.r@web.de> writes:
>
>> git branch refuses to delete branches that are currently checked out
>> with a message like this: "error: cannot delete branch 'foo' used by
>> worktree at '/path/of/worktree'". This can be confusing if it's an
>> internal checkout for git bisect. Report a more specific error in
>> that case to help users that might have forgotten their bisect run.
>>
>> Suggested-by: stsp <stsp2@yandex.ru>
>> Signed-off-by: René Scharfe <l.s.r@web.de>
>> ---
>> Changes since v2:
>> - Only report bisect runs as specific rejection reason for now.
>> - Leave rebasing unaddressed because I don't see how to formulate
>> clear and readable messages for those scenarios, yet.
>> - Collect all checkout reasons of all branches in a simple array for
>> easy use, e.g. to eventually address rebases or for git status.
>> - Rebased onto the landed test_grep conversion.
>
> The scope of this patch has shrunk a bit. While the 'in use by a
> rebase' state is still recognized internally, unlike in the previous
> round, we guard users only against the 'in use by a bisect' state and
> the 'in use by being checked out' state.
>
> This is probably a good single step, so unless there are objections,
> let's mark the topic for 'next'.
I agree this is a useful improvement as it is.
Thanks
Phillip
> My understanding of what is stopping us from taking the next step is
> that we do not know the exact phrasing to express the 'in use by a
> rebase' state concisely.
>
> Thanks.
>
prev parent reply other threads:[~2026-07-29 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 4:39 [PATCH] branch: report kind of checkout when rejecting delete René Scharfe
2026-07-18 17:34 ` Junio C Hamano
2026-07-18 19:07 ` René Scharfe
2026-07-18 22:09 ` Junio C Hamano
2026-07-19 5:55 ` René Scharfe
2026-07-19 9:50 ` Phillip Wood
2026-07-25 10:41 ` [PATCH v2] branch: report active bisect run " René Scharfe
2026-07-26 15:36 ` Junio C Hamano
2026-07-28 13:36 ` Toon Claes
2026-07-29 15:22 ` Phillip Wood [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=3bdca3f4-affa-4443-afb6-fd7ca20cf012@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=phillip.wood@dunelm.org.uk \
--cc=stsp2@yandex.ru \
/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