Homestyx hydra

R1:6ccb6a6463f7

Update "git rev-parse" invocation to work in Git 2.25.0

Summary:
Fixes T13479. The behavior of "git rev-parse --show-toplevel" has changed in Git 2.25.0, and it now fails in bare repositories.

Instead, use "git rev-parse --git-dir" to sanity-check the working copy. This appears to have more stable behavior across Git versions, although it's a little more complicated for our purposes.

Test Plan:
- Ran `bin/repository update ...` on an observed, bare repository.
- ...on an observed, non-bare…
Repository: R1 hydra
Commit Date: Jan 16 2020