summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_cas.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-12-03 16:21:17 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-01-13 16:21:08 +0100
commit27ed2a935e20c0c00e4d74a2d09b5fb6d7f8c082 (patch)
treec248ac36b3031f1ca0e86f4d7cf6fc356d3513f2 /src/buildtool/file_system/git_cas.cpp
parentd10e9bbbec05e177558b351a55169b31417967a8 (diff)
downloadjustbuild-27ed2a935e20c0c00e4d74a2d09b5fb6d7f8c082.tar.gz
GitCAS: use the same call for openning repository as GitRepo does.
(cherry-picked from cdd3a6a777a36ff98b60cf47c91281a69c39c4e2)
Diffstat (limited to 'src/buildtool/file_system/git_cas.cpp')
-rw-r--r--src/buildtool/file_system/git_cas.cpp5
1 files changed, 4 insertions, 1 deletions
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(),