Don't display errors when building the prompt

On a freshly-initialized git repository `git rev-parse --abbrev-ref
HEAD` returned an error (because there weren't any commits yet, so HEAD
didn't point to anything; I think).