Fix `get_git_repo_dir` (#71448)
Summary:
Otherwise, rev-list will only pick-up commits in `.github` repo
Before:
```
% git -C .github rev-list 1eb6146d967b2d09af37c54af411d03f0b790209..1ff7f65cc1ad499a71457368894ca14bed069749 -- .
598b55fd1894b7edb21f208b1c86fd6a377ebc69
ae089d6bdf03f1fadbc76fdf3d284081396251e8
```
After
```
% git -C . rev-list 1eb6146d967b2d09af37c54af411d03f0b790209..1ff7f65cc1ad499a71457368894ca14bed069749 -- .
1ff7f65cc1ad499a71457368894ca14bed069749
2ac58b0dc13f152bea180dd3d64b7c36fe0ba755
598b55fd1894b7edb21f208b1c86fd6a377ebc69
55899528a266363d27e0cf5e82b1b94524509756
ae089d6bdf03f1fadbc76fdf3d284081396251e8
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71448
Reviewed By: seemethere, atalman
Differential Revision: D33644256
Pulled By: malfet
fbshipit-source-id: fa2e06f6767e7702af6ce85471aea07fa58292c0
(cherry picked from commit 594cecc0e1b95bacbd0d1d87bf7c622a3a5b04e5)