From: Tamir Duberstein <tamird@fuseenergy.com>
To: git@vger.kernel.org
Subject: bug report: spurious "cannot delete branch '%s' used by worktree"
Date: Thu, 28 Mar 2024 14:53:37 +0000 [thread overview]
Message-ID: <CAEYvaskGHYrQgke=gf1sXYhrwbd+SeTpcjGF0fpxK3hQbyPFKg@mail.gmail.com> (raw)
Pasting the output of `git bugreport`:
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
I created a branch, pushed to a remote, and then the remote deleted the branch.
Then I tried to delete the local branch.
What did you expect to happen? (Expected behavior)
The branch to be deleted.
What happened instead? (Actual behavior)
% git branch -d cleanup
error: cannot delete branch 'cleanup' used by worktree at '<my source dir>'
% git worktree list
<my source dir> dc46f6d5e [main]
% git branch
cleanup
* main
What's different between what you expected and what actually happened?
Git reports the branch is being used by a worktree, but prints the current
repository's directory, where a different branch is clearly checked out.
Anything else you want to add:
Please review the rest of the bug report below.
You can delete any lines you don't wish to share.
[System Info]
git version:
git version 2.44.0
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25
PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64
compiler info: clang: 15.0.0 (clang-1500.1.0.2.5)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh
[Enabled Hooks]
next reply other threads:[~2024-03-28 14:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 14:53 Tamir Duberstein [this message]
2024-03-28 17:24 ` bug report: spurious "cannot delete branch '%s' used by worktree" 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
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='CAEYvaskGHYrQgke=gf1sXYhrwbd+SeTpcjGF0fpxK3hQbyPFKg@mail.gmail.com' \
--to=tamird@fuseenergy.com \
--cc=git@vger.kernel.org \
/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).