Git: use HEAD to determine current hash

This is more robust in a detached HEAD situation.
Merge pull request #78 from larsrh/patch-1

Git: use HEAD to determine current hash