Bug 1021355

Check for git objects with `git show` rather than for references with
`git show-ref`. `git show-ref` does not accept SHA1, while `git show`
does.