From 22ddf965548a648a577f732007b67b26036ce685 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 11 Dec 2024 14:38:15 +0100 Subject: RepositoryConfig::SetGitCAS: allow setting log_level ... as there might be cases where it is expected that setting the git CAS fails, e.g., if referring to the implict git repository in the local build root as a fallback CAS. --- src/buildtool/common/repository_config.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/buildtool/common/repository_config.hpp') diff --git a/src/buildtool/common/repository_config.hpp b/src/buildtool/common/repository_config.hpp index 0060152d..218cd14d 100644 --- a/src/buildtool/common/repository_config.hpp +++ b/src/buildtool/common/repository_config.hpp @@ -31,6 +31,7 @@ #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/git_cas.hpp" #include "src/buildtool/file_system/git_tree.hpp" +#include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/multithreading/atomic_value.hpp" #include "src/buildtool/storage/storage.hpp" @@ -61,8 +62,9 @@ class RepositoryConfig { } [[nodiscard]] auto SetGitCAS( - std::filesystem::path const& repo_path) noexcept { - git_cas_ = GitCAS::Open(repo_path); + std::filesystem::path const& repo_path, + LogLevel log_level = LogLevel::Warning) noexcept -> bool { + git_cas_ = GitCAS::Open(repo_path, log_level); return static_cast(git_cas_); } -- cgit v1.2.3