Thread (8 messages) flat view 8 messages, 3 authors, 2016-07-09

Re: git branch doesn't allow me to forcibly delete branch which was checked out in a now-deleted worktree dir

From: Jacob Keller <hidden>
Date: 2016-07-09 04:58:50

On Fri, Jul 8, 2016 at 7:22 PM, Erik Johnson [off-list ref] wrote:
On Fri, Jul 08, 2016 at 05:41:17PM -0700, Jacob Keller wrote:
quoted
It is possible we should update "git branch -d" should perform a
worktree prune first, since that would enable it to determine that you
deleted the directory, and any worktree which is removable should be
marked as persistent.

Given that there is a known workaround (git worktree prune) and that
it is expected behavior for a branch checked out to prevent deletion,
I think the best coarse of action would be to patch git branch -d to
do a prune before attempting to delete.

Thanks,
Jake

Well, I never mentioned -d (I was using -D), but I think we're both in
agreement.
Out of curiosity, what is git branch -D behavior when the worktree does exist?

Thanks,
Jake
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help