Extract compact branch name.