grep: handle errors gracefully
grep: handle errors gracefully

If `git grep` fails in any project checkout (e.g. an incomplete
sync), make sure we print that error clearly rather than blowing
up, and exit non-zero in the process.

Bug: https://crbug.com/gerrit/11613
Change-Id: I31de1134fdcc7aaa9814cf2eb6a67d398eebf9cf
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239237
Reviewed-by: David Pursehouse <e7b5c6a4a3dbaca972851f8c075e19915752593f@collab.net>
Tested-by: Mike Frysinger <8f3f75c74bd5184edcfa6534cab3c13a00a2f794@google.com>

GerritCodeReview/git-repo,aosp-mirror/tools_repo,couchbasedeps/git-repo,codetutil/git-repo,GerritCodeReview/git-repo,mer-tools/git-repo,mer-tools/git-repo,lewixliu/git-repo,aosp-mirror/tools_repo,lipro-yocto/git-repo,lewixliu/git-repo,lipro-yocto/git-repo,TheQtCompany/git-repo,gabbayo/git-repo,couchbasedeps/git-repo,gabbayo/git-repo,TheQtCompany/git-repo,codetutil/git-repo