Change [DETACHED HEAD] message to a short hash of the detached head

Being on branch `[DETACHED HEAD]` doesn't offer much information. It's much more helpful to have a short hash of the detached head instead.