summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps/git_update_map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/ops_maps/git_update_map.hpp')
-rw-r--r--src/other_tools/ops_maps/git_update_map.hpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/other_tools/ops_maps/git_update_map.hpp b/src/other_tools/ops_maps/git_update_map.hpp
index 1978069a..e1aac2e3 100644
--- a/src/other_tools/ops_maps/git_update_map.hpp
+++ b/src/other_tools/ops_maps/git_update_map.hpp
@@ -23,19 +23,28 @@
#include "src/other_tools/git_operations/git_repo_remote.hpp"
#include "src/utils/cpp/hash_combine.hpp"
-using StringPair = std::pair<std::string, std::string>;
+struct RepoDescriptionForUpdating {
+ std::string repo{};
+ std::string branch{};
+ std::vector<std::string> inherit_env{}; /*non-key!*/
+
+ [[nodiscard]] auto operator==(const RepoDescriptionForUpdating& other) const
+ -> bool {
+ return repo == other.repo and branch == other.branch;
+ }
+};
/// \brief Maps a pair of repository url and branch to an updated commit hash.
-using GitUpdateMap = AsyncMapConsumer<StringPair, std::string>;
+using GitUpdateMap = AsyncMapConsumer<RepoDescriptionForUpdating, std::string>;
namespace std {
template <>
-struct hash<StringPair> {
- [[nodiscard]] auto operator()(StringPair const& ct) const noexcept
- -> std::size_t {
+struct hash<RepoDescriptionForUpdating> {
+ [[nodiscard]] auto operator()(
+ RepoDescriptionForUpdating const& ct) const noexcept -> std::size_t {
size_t seed{};
- hash_combine<std::string>(&seed, ct.first);
- hash_combine<std::string>(&seed, ct.second);
+ hash_combine<std::string>(&seed, ct.repo);
+ hash_combine<std::string>(&seed, ct.branch);
return seed;
}
};
@@ -46,4 +55,4 @@ struct hash<StringPair> {
std::vector<std::string> const& launcher,
std::size_t jobs) -> GitUpdateMap;
-#endif // INCLUDED_SRC_OTHER_TOOLS_OPS_MAPS_GIT_UPDATE_MAP_HPP \ No newline at end of file
+#endif // INCLUDED_SRC_OTHER_TOOLS_OPS_MAPS_GIT_UPDATE_MAP_HPP