Looks for a git repository.
The lookup starts from path and walks up the parent directories and stops when a repository is found.
path
the base location where the lookup starts.
the repository location.