Change the check for git rev-parse to fail if the SHA is not found. Refs...

... #8163.

Hat tip to @basepi.