summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/fpath_git_map.hpp
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.hpp
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.hpp')
-rw-r--r--src/other_tools/root_maps/fpath_git_map.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/other_tools/root_maps/fpath_git_map.hpp b/src/other_tools/root_maps/fpath_git_map.hpp
index 9c78b868..25721c19 100644
--- a/src/other_tools/root_maps/fpath_git_map.hpp
+++ b/src/other_tools/root_maps/fpath_git_map.hpp
@@ -16,18 +16,19 @@
#define INCLUDED_SRC_OTHER_TOOLS_ROOT_MAPS_FPATH_GIT_MAP_HPP
#include "nlohmann/json.hpp"
+#include "src/other_tools/just_mr/utils.hpp"
#include "src/other_tools/ops_maps/import_to_git_map.hpp"
#include "src/utils/cpp/hash_combine.hpp"
#include "src/utils/cpp/path_hash.hpp"
struct FpathInfo {
std::filesystem::path fpath{}; /* key */
- // create root that ignores symlinks
- bool ignore_special{}; /* key */
+ // create root based on "special" pragma value
+ std::optional<PragmaSpecial> pragma_special{std::nullopt}; /* key */
[[nodiscard]] auto operator==(const FpathInfo& other) const noexcept
-> bool {
- return fpath == other.fpath and ignore_special == other.ignore_special;
+ return fpath == other.fpath and pragma_special == other.pragma_special;
}
};
@@ -47,7 +48,7 @@ struct hash<FpathInfo> {
-> std::size_t {
size_t seed{};
hash_combine<std::filesystem::path>(&seed, ct.fpath);
- hash_combine<bool>(&seed, ct.ignore_special);
+ hash_combine<std::optional<PragmaSpecial>>(&seed, ct.pragma_special);
return seed;
}
};