diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-05 18:02:53 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-07 09:34:01 +0100 |
commit | ae16d8be16e4104eaab130b0f1e18883e22bf742 (patch) | |
tree | 09c26f2236c9561ab0340de38d20c355dd10e6a2 | |
parent | 16b8d9f28af3ca166c9abc6f04c9164490a3c077 (diff) | |
download | justbuild-ae16d8be16e4104eaab130b0f1e18883e22bf742.tar.gz |
just-mr fetch: Correctly report if no fetch required
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 8f3ae800..0dfb6c8a 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -377,11 +377,16 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, auto str_a = fmt::format("{} {}", nr_a, nr_a == 1 ? "archive" : "archives"); auto str_gt = fmt::format("{} git {}", nr_gt, nr_gt == 1 ? "tree" : "trees"); - Logger::Log(LogLevel::Info, - "Found {}{}{} to fetch", - nr_a != 0 ? str_a : std::string(), - nr_a != 0 and nr_gt != 0 ? " and " : "", - nr_gt != 0 ? str_gt : std::string()); + auto fetchables = fmt::format("{}{}{}", + nr_a != 0 ? str_a : std::string(), + nr_a != 0 and nr_gt != 0 ? " and " : "", + nr_gt != 0 ? str_gt : std::string()); + if (fetchables.empty()) { + Logger::Log(LogLevel::Info, "No fetch required"); + } + else { + Logger::Log(LogLevel::Info, "Found {} to fetch", fetchables); + } // setup the APIs for archive fetches; only happens if in native mode auto remote_api = |