fix git branch detection