From c932331dccab9406404d0a4bbc177eb39fa77dc4 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 23 Jan 2025 15:35:24 +0100 Subject: JustMr: Replace calls to CheckServeHasAbsentRoot with direct calls to serve --- src/other_tools/root_maps/distdir_git_map.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/other_tools/root_maps/distdir_git_map.cpp') diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index 213b4f94..44213cd9 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -31,7 +31,6 @@ #include "src/buildtool/multithreading/task_system.hpp" #include "src/buildtool/storage/fs_utils.hpp" #include "src/other_tools/git_operations/git_ops_types.hpp" -#include "src/other_tools/root_maps/root_utils.hpp" #include "src/utils/cpp/expected.hpp" #include "src/utils/cpp/hex_string.hpp" #include "src/utils/cpp/tmp_dir.hpp" @@ -209,9 +208,14 @@ auto CreateDistdirGitMap( if (key.absent) { if (serve != nullptr) { // check if serve endpoint has this root - auto has_tree = CheckServeHasAbsentRoot( - *serve, distdir_tree_id, logger); + auto const has_tree = + serve->CheckRootTree(distdir_tree_id); if (not has_tree) { + (*logger)(fmt::format("Checking that the serve " + "endpoint knows tree " + "{} failed.", + distdir_tree_id), + /*fatal=*/true); return; } if (not *has_tree) { @@ -350,9 +354,13 @@ auto CreateDistdirGitMap( if (key.absent) { if (serve != nullptr) { // first check if serve endpoint has tree - auto has_tree = - CheckServeHasAbsentRoot(*serve, tree_id, logger); + auto const has_tree = serve->CheckRootTree(tree_id); if (not has_tree) { + (*logger)(fmt::format("Checking that the serve " + "endpoint knows tree " + "{} failed.", + tree_id), + /*fatal=*/true); return; } if (*has_tree) { -- cgit v1.2.3