Fixes the issue #11
Typically reading '.git/HEAD' we'll get 'ref: refs/xxx/branchname'.
But also, sometimes we'll get a plain commit id, when the HEAD is in a detached state. In this state, we cannot determine the branch name, because it's not on any branch, it's a special situation.
I also left warnings when encounter a situation we've never considered.
Fixes the issue #11 Typically reading '.git/HEAD' we'll get 'ref: refs/xxx/branchname'. But also, sometimes we'll get a plain commit id, when the HEAD is in a detached state. In this state, we cannot determine the branch name, because it's not on any branch, it's a special situation. I also left warnings when encounter a situation we've never considered.