Would be pretty incredible if the git branch command had a vulnerability.
On the other hand, having a git aware PS1 would also immediately alert you to the fact that a user had created a top level .git folder, thereby allowing you to prevent the first cve here.