diff options
Diffstat (limited to 'src/other_tools/root_maps/content_git_map.cpp')
-rw-r--r-- | src/other_tools/root_maps/content_git_map.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp index 9af1c49c..b7a3c25e 100644 --- a/src/other_tools/root_maps/content_git_map.cpp +++ b/src/other_tools/root_maps/content_git_map.cpp @@ -14,6 +14,7 @@ #include "src/other_tools/root_maps/content_git_map.hpp" +#include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/file_storage.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/storage.hpp" @@ -81,6 +82,7 @@ auto CreateContentGitMap( {std::move(op_key)}, [archive_tree_id = *archive_tree_id, subdir = key.subdir, + ignore_special = key.ignore_special, setter, logger](auto const& values) { GitOpValue op_result = *values[0]; @@ -114,12 +116,14 @@ auto CreateContentGitMap( return; } // set the workspace root - (*setter)( - std::pair(nlohmann::json::array( - {"git tree", - *subtree_hash, - StorageConfig::GitRoot().string()}), - true)); + (*setter)(std::pair( + nlohmann::json::array( + {ignore_special + ? FileRoot::kGitTreeIgnoreSpecialMarker + : FileRoot::kGitTreeMarker, + *subtree_hash, + StorageConfig::GitRoot().string()}), + true)); }, [logger, target_path = StorageConfig::GitRoot()]( auto const& msg, bool fatal) { @@ -140,6 +144,7 @@ auto CreateContentGitMap( repo_type = key.repo_type, content_id = key.archive.content, subdir = key.subdir, + ignore_special = key.ignore_special, origin = key.archive.origin, import_to_git_map, ts, @@ -181,6 +186,7 @@ auto CreateContentGitMap( [tmp_dir, // keep tmp_dir alive archive_tree_id_file, subdir, + ignore_special, origin, setter, logger](auto const& values) { @@ -241,7 +247,9 @@ auto CreateContentGitMap( // set the workspace root (*setter)(std::pair( nlohmann::json::array( - {"git tree", + {ignore_special + ? FileRoot::kGitTreeIgnoreSpecialMarker + : FileRoot::kGitTreeMarker, *subtree_hash, StorageConfig::GitRoot().string()}), false)); |