From 617fad94f3ea4566ad4124d2a3731d633bd84b9d Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 24 Jan 2024 09:55:31 +0100 Subject: just-mr: in to_git warning, report actual tool names ... instead of some hard-coded strings, as that can be confusing when the tool is packaged under a different name. --- src/other_tools/just_mr/fetch.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/other_tools/just_mr/fetch.cpp') diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 47b4586c..853cd233 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -37,7 +37,8 @@ auto MultiRepoFetch(std::shared_ptr const& config, MultiRepoCommonArguments const& common_args, MultiRepoSetupArguments const& setup_args, MultiRepoFetchArguments const& fetch_args, - MultiRepoRemoteAuthArguments const& auth_args) -> int { + MultiRepoRemoteAuthArguments const& auth_args, + std::string multi_repository_tool_name) -> int { // provide report Logger::Log(LogLevel::Info, "Performing repositories fetch"); @@ -491,9 +492,11 @@ auto MultiRepoFetch(std::shared_ptr const& config, &ts, archives_to_fetch, []([[maybe_unused]] auto const& values) {}, - [&failed_archives](auto const& msg, bool fatal) { + [&failed_archives, &multi_repository_tool_name](auto const& msg, + bool fatal) { Logger::Log(fatal ? LogLevel::Error : LogLevel::Warning, - "While performing just-mr fetch:\n{}", + "While performing {} fetch:\n{}", + multi_repository_tool_name, msg); failed_archives = failed_archives or fatal; }); @@ -505,9 +508,11 @@ auto MultiRepoFetch(std::shared_ptr const& config, &ts, git_trees_to_fetch, []([[maybe_unused]] auto const& values) {}, - [&failed_git_trees](auto const& msg, bool fatal) { + [&failed_git_trees, &multi_repository_tool_name](auto const& msg, + bool fatal) { Logger::Log(fatal ? LogLevel::Error : LogLevel::Warning, - "While performing just-mr fetch:\n{}", + "While performing {} fetch:\n{}", + multi_repository_tool_name, msg); failed_git_trees = failed_git_trees or fatal; }); -- cgit v1.2.3