On Thu, Jul 7, 2016 at 8:44 PM, Erik Johnson <paleh...@gmail.com> wrote:
> % git branch -D archive-extracted-xz
> error: Cannot delete branch 'archive-extracted-xz' checked out at
> '/home/erik/git/salt/archive-extracted-xz'

This is from commit f292244 (branch -d: refuse deleting a branch which
is currently checked out - 2016-03-29) which is about -d not -D, so
it's probably an oversight. I think -D, as a forced form, should allow
deleting branches on other worktrees, we could simply detach the
worktree first.

It's worth noting that before that commit, -D refuses to delete branch
on current worktree as well and f292244 simply applies the same
behavior on other worktrees. If we change the -D behavior about
deleting branches on other worktrees, we may need to consider to keep
the behavior on current branch, or treat it equally as any other
worktrees.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to