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.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/other_tools/root_maps/fpath_git_map.hpp') 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 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 { -> std::size_t { size_t seed{}; hash_combine(&seed, ct.fpath); - hash_combine(&seed, ct.ignore_special); + hash_combine>(&seed, ct.pragma_special); return seed; } }; -- cgit v1.2.3