From c8634c742c6797cd2b8033bbcde74f5c871be4b6 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 11 Dec 2024 15:12:23 +0100 Subject: main: avoid spourious warnings ... given that a proper reporting of the return code if repo_config.SetGitCAS is contained in main anyway. Therefore, log the details trying to set the git cas to a level less than that of the final reporting. --- src/buildtool/main/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 9a05769a..14da6846 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -1016,7 +1016,8 @@ auto main(int argc, char* argv[]) -> int { ProgressReporter::Reporter(&stats, &progress)}; if (arguments.cmd == SubCommand::kInstallCas) { - if (not repo_config.SetGitCAS(storage_config->GitRoot())) { + if (not repo_config.SetGitCAS(storage_config->GitRoot(), + LogLevel::Trace)) { Logger::Log(LogLevel::Debug, "Failed set Git CAS {}.", storage_config->GitRoot().string()); @@ -1081,7 +1082,8 @@ auto main(int argc, char* argv[]) -> int { "--compatible"); return kExitFailure; } - if (not repo_config.SetGitCAS(*arguments.graph.git_cas)) { + if (not repo_config.SetGitCAS(*arguments.graph.git_cas, + LogLevel::Debug)) { Logger::Log(LogLevel::Warning, "Failed set Git CAS {}.", arguments.graph.git_cas->string()); -- cgit v1.2.3