git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug report: spurious "cannot delete branch '%s' used by worktree"
@ 2024-03-28 14:53 Tamir Duberstein
  2024-03-28 17:24 ` Eric Sunshine
  0 siblings, 1 reply; 11+ messages in thread
From: Tamir Duberstein @ 2024-03-28 14:53 UTC (permalink / raw)
  To: git

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]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-02 15:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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 NNTP newsgroup(s).