[GHF] Fix ghstack branches in sync logic (#93298)
Test plan:
```python
from git_utils import are_ghstack_branches_in_sync,GitRepo
repo=GitRepo("/Users/nshulga/git/pytorch/pytorch")
are_ghstack_branches_in_sync(repo, "gh/SS-JIA/206/head")
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93298
Approved by: https://github.com/clee2000, https://github.com/ZainRizvi