Fix git prompt on detached HEAD

Display tag name if on a tag, else the commit short number