Use git's plumbing to lookup HEAD
Fallback to original behaviour on IOException
Always return full SHA1 hash of HEAD
Fallback to the original behaviour on any error invoking git plumbing
Merge pull request #1243 from richo/features/git_plumbing

Use git's plumbing to lookup HEAD