Extract current_branch helper method