for git 1.8.3, in git 1.8.3 the default branch name is "detached from <REVISION>", if doesn't skip it then `git rev-parse detached...` will lost.