Handles the cases where branch name contains '('. fixes #390