From edd091f4b4065ff2a4e4932be37c97628a6640d6 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 4 Dec 2023 16:51:07 +0100 Subject: just-mr git tree: Extract the fetch logic in its own async map --- src/other_tools/repo_map/TARGETS | 2 ++ src/other_tools/repo_map/repos_to_setup_map.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/other_tools/repo_map') diff --git a/src/other_tools/repo_map/TARGETS b/src/other_tools/repo_map/TARGETS index c397d82c..166e0696 100644 --- a/src/other_tools/repo_map/TARGETS +++ b/src/other_tools/repo_map/TARGETS @@ -17,6 +17,8 @@ , ["src/other_tools/just_mr/progress_reporting", "statistics"] , ["src/buildtool/file_system", "file_root"] , ["src/buildtool/file_system/symlinks_map", "pragma_special"] + , ["src/other_tools/ops_maps", "content_cas_map"] + , ["src/other_tools/ops_maps", "git_tree_fetch_map"] ] } } diff --git a/src/other_tools/repo_map/repos_to_setup_map.cpp b/src/other_tools/repo_map/repos_to_setup_map.cpp index c0a8cac1..3f9390b2 100644 --- a/src/other_tools/repo_map/repos_to_setup_map.cpp +++ b/src/other_tools/repo_map/repos_to_setup_map.cpp @@ -18,6 +18,8 @@ #include "src/buildtool/file_system/symlinks_map/pragma_special.hpp" #include "src/other_tools/just_mr/progress_reporting/progress.hpp" #include "src/other_tools/just_mr/progress_reporting/statistics.hpp" +#include "src/other_tools/ops_maps/content_cas_map.hpp" +#include "src/other_tools/ops_maps/git_tree_fetch_map.hpp" namespace { @@ -740,10 +742,10 @@ void GitTreeCheckout(ExpressionPtr const& repo_desc, pragma_absent->get()->Bool(); // populate struct TreeIdInfo tree_id_info = { - .hash = repo_desc_hash->get()->String(), - .env_vars = std::move(env), - .inherit_env = std::move(inherit_env), - .command = std::move(cmd), + .tree_info = GitTreeInfo{.hash = repo_desc_hash->get()->String(), + .env_vars = std::move(env), + .inherit_env = std::move(inherit_env), + .command = std::move(cmd)}, .ignore_special = pragma_special_value == PragmaSpecial::Ignore, .absent = not fetch_absent and pragma_absent_value}; // get the WS root as git tree -- cgit v1.2.3