I can consistently reproduce the following bug:
I navigate to a branch in a bitbucket repository and click on merge, selecting the "close branch" option. I get a merge conflict (because of a submodule change) and I click cancel (but leave the close branch checkbox selected).
Instead of merely canceling the merge, Bitbucket deletes my branch, even though the merge failed.
I came close a couple of times to losing work, so this is pretty bad. This branch shouldn't have been deleted, for example: https://bitbucket.org/idg-dev/misc/branch/CORE-589