From 27ed2a935e20c0c00e4d74a2d09b5fb6d7f8c082 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 3 Dec 2024 16:21:17 +0100 Subject: GitCAS: use the same call for openning repository as GitRepo does. (cherry-picked from cdd3a6a777a36ff98b60cf47c91281a69c39c4e2) --- src/buildtool/file_system/git_cas.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/buildtool/file_system/git_cas.cpp') diff --git a/src/buildtool/file_system/git_cas.cpp b/src/buildtool/file_system/git_cas.cpp index 32426e88..0f005e46 100644 --- a/src/buildtool/file_system/git_cas.cpp +++ b/src/buildtool/file_system/git_cas.cpp @@ -147,7 +147,10 @@ auto GitCAS::OpenODB(std::filesystem::path const& repo_path) noexcept -> bool { { // lock as git_repository API has no thread-safety guarantees std::unique_lock lock{repo_mutex}; git_repository* repo = nullptr; - if (git_repository_open(&repo, repo_path.c_str()) != 0) { + if (git_repository_open_ext(&repo, + repo_path.c_str(), + GIT_REPOSITORY_OPEN_NO_SEARCH, + nullptr) != 0) { Logger::Log(LogLevel::Debug, "opening git repository {} failed with:\n{}", repo_path.string(), -- cgit v1.2.3