fix parsing of git branch