Cleaner way to detech detached branch, and a comment.
Code to show the hash (not enabled)