Support find repo in ancestor path in non-existent parent path.
See: #6380
Expected behavior
- init git in
/User/rustin/test
- try find the repo in
/User/rustin/test/non-exist path.
- Use this bind API to find the root repo and it exists.
Actual behavior
Can not find it.