Fix git PS1 to work in repos that are detached head