parse git branch worked only in the topdir of a git repo.