Suppress git stderr when checking for existence of repo (#7891)
Suppress git stderr when checking for existence of repo (#7891)

When we shell out to `git rev-parse` in `detect_worktree` to check for
the existence of a git repository, we should be suppressing the stderr
output to avoid printing the confusing git error message `fatal: not a
git repository (or any of the parent directories): .git` in the case
where pants happens not to be invoked inside a git repo.
wisechengyi/pants,jsirois/pants,benjyw/pants,wisechengyi/pants,wisechengyi/pants,benjyw/pants,wisechengyi/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,jsirois/pants,pantsbuild/pants,wisechengyi/pants,tdyas/pants,wisechengyi/pants,tdyas/pants,wisechengyi/pants,benjyw/pants,tdyas/pants,pantsbuild/pants,tdyas/pants,tdyas/pants,pantsbuild/pants,wisechengyi/pants,tdyas/pants,pantsbuild/pants,tdyas/pants,benjyw/pants,benjyw/pants,tdyas/pants,pantsbuild/pants,pantsbuild/pants,jsirois/pants,wisechengyi/pants,tdyas/pants