All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "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: Sun, 26 Jul 2026 08:36:47 -0700	[thread overview]
Message-ID: <xmqqbjbtyd80.fsf@gitster.g> (raw)
In-Reply-To: <590382fb-731b-4e14-911e-ff68356d1082@web.de> ("René Scharfe"'s message of "Sat, 25 Jul 2026 12:41:07 +0200")

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'.

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.

      reply	other threads:[~2026-07-26 15:36 UTC|newest]

Thread overview: 8+ 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 [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=xmqqbjbtyd80.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.