Bug 1021355

Check for git objects with `git rev-parse` rather than for references with
`git show-ref`.
Merge pull request #3943 from BanzaiMan/dev/hasari/bz1021355

Merged by openshift-bot