diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-13 16:41:12 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-23 14:13:49 +0100 |
commit | f60a95ef44ebedfe6859577420fb89f0c24b9663 (patch) | |
tree | 80266ed2ec1a93e6df5f429770e1e6d6cdc9cee4 /src | |
parent | 1ed993c81acb88110029358e407880639f3339ca (diff) | |
download | justbuild-f60a95ef44ebedfe6859577420fb89f0c24b9663.tar.gz |
GitRepo: Make repository path usage explicit
Opening a repo should not check parent directories, only try to
open at given path.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/file_system/git_repo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp index 1eed7eb7..7fb0bc76 100644 --- a/src/buildtool/file_system/git_repo.cpp +++ b/src/buildtool/file_system/git_repo.cpp @@ -297,7 +297,10 @@ GitRepo::GitRepo(std::filesystem::path const& repo_path) noexcept { auto cas = std::make_shared<GitCAS>(); // open repo, but retain it git_repository* repo_ptr{nullptr}; - if (git_repository_open(&repo_ptr, repo_path.c_str()) != 0) { + if (git_repository_open_ext(&repo_ptr, + repo_path.c_str(), + GIT_REPOSITORY_OPEN_NO_SEARCH, + nullptr) != 0) { Logger::Log(LogLevel::Error, "opening git repository {} failed with:\n{}", repo_path.string(), |