def METHOD_NAME(self, branch):
    def kont():
        self.git("checkout", branch, "--detach")
        self.window.run_command("gs_delete_branch", {"branch": branch, "force": False})
    show_actions_panel(self.window, [
        noop("Abort, '{}' is checked out.".format(branch)),
        ("Detach HEAD and delete.", kont)
    ])