When the repository is opened with `GIT_REPOSITORY_OPEN_FROM_ENV`, honor the `GIT_WORK_TREE` environment variable.