Skip to content

Commit

Permalink
main: avoid spourious warnings
Browse files Browse the repository at this point in the history
... 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.
  • Loading branch information
aehlig committed Dec 11, 2024
1 parent 22ddf96 commit c8634c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/buildtool/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit c8634c7

Please sign in to comment.