From 317cb72c64330036f23fd19a7caf65637bac5bc1 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 13 Jul 2023 11:41:07 +0200 Subject: just-mr: Update async map keys with the 'special' pragma value For 'file' and 'archive' checkouts we will handle more than just the 'ignore' value. --- src/other_tools/root_maps/fpath_git_map.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/other_tools/root_maps/fpath_git_map.cpp') diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index e7946e71..e26b3a9d 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -17,7 +17,6 @@ #include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/storage/config.hpp" -#include "src/other_tools/just_mr/utils.hpp" #include "src/utils/cpp/tmp_dir.hpp" auto CreateFilePathGitMap( @@ -73,7 +72,7 @@ auto CreateFilePathGitMap( ts, {std::move(op_key)}, [fpath = key.fpath, - ignore_special = key.ignore_special, + pragma_special = key.pragma_special, git_cas = std::move(git_cas), repo_root = std::move(*repo_root), setter, @@ -111,8 +110,9 @@ auto CreateFilePathGitMap( } // set the workspace root (*setter)(nlohmann::json::array( - {ignore_special ? FileRoot::kGitTreeIgnoreSpecialMarker - : FileRoot::kGitTreeMarker, + {pragma_special == PragmaSpecial::Ignore + ? FileRoot::kGitTreeIgnoreSpecialMarker + : FileRoot::kGitTreeMarker, *tree_hash, repo_root})); }, @@ -159,7 +159,7 @@ auto CreateFilePathGitMap( {std::move(c_info)}, // tmp_dir passed, to ensure folder is not removed until import // to git is done - [tmp_dir, ignore_special = key.ignore_special, setter, logger]( + [tmp_dir, pragma_special = key.pragma_special, setter, logger]( auto const& values) { // check for errors if (not values[0]->second) { @@ -171,8 +171,9 @@ auto CreateFilePathGitMap( std::string tree = values[0]->first; // set the workspace root (*setter)(nlohmann::json::array( - {ignore_special ? FileRoot::kGitTreeIgnoreSpecialMarker - : FileRoot::kGitTreeMarker, + {pragma_special == PragmaSpecial::Ignore + ? FileRoot::kGitTreeIgnoreSpecialMarker + : FileRoot::kGitTreeMarker, tree, StorageConfig::GitRoot()})); }, -- cgit v1.2.3