summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/fpath_git_map.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-07-13 11:41:07 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-07 17:01:01 +0200
commit317cb72c64330036f23fd19a7caf65637bac5bc1 (patch)
tree4760afa62324c21b491933d9be6849b951769fa2 /src/other_tools/root_maps/fpath_git_map.cpp
parent19aa5015df60e0b9eccf1a93afb0d9776692f5d3 (diff)
downloadjustbuild-317cb72c64330036f23fd19a7caf65637bac5bc1.tar.gz
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.
Diffstat (limited to 'src/other_tools/root_maps/fpath_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/fpath_git_map.cpp15
1 files changed, 8 insertions, 7 deletions
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()}));
},