Support for detached head.
Bugfix.

Can’t numerically compare hex branch names. Let’s stick to strings.