Only git rev-parse when in git repo.

In [45110c4] a simplified version of the git-branch-in-prompt was
introduced, to prevent showing a branch when in a non-git subdir of the
home directory.  The solution was sub-optimum, since it did not take into
account paths that have no .git _at all_ in their parent tree.

By just checking exit status of git rev-parse and combining that with
its actual output, we can circumvent this.