diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-09-08 18:15:01 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-09-13 16:14:43 +0200 |
commit | 669d1d8714b258ffd19f1610028374233a143f4b (patch) | |
tree | ef3774508075f028637844fac2095a5dc2cbce08 /src/other_tools/root_maps/fpath_git_map.hpp | |
parent | f48e1ebe7f08159004bf9a88d5a9e474ff32dbb1 (diff) | |
download | justbuild-669d1d8714b258ffd19f1610028374233a143f4b.tar.gz |
just-mr: Implement 'absent' roots
...via an 'absent' pragma in repository descriptions.
For 'git'-type repositories, first interrogates a 'just serve'
remote, if given, before reverting to fetching from the network.
Diffstat (limited to 'src/other_tools/root_maps/fpath_git_map.hpp')
-rw-r--r-- | src/other_tools/root_maps/fpath_git_map.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/other_tools/root_maps/fpath_git_map.hpp b/src/other_tools/root_maps/fpath_git_map.hpp index 39cae653..6063aa8d 100644 --- a/src/other_tools/root_maps/fpath_git_map.hpp +++ b/src/other_tools/root_maps/fpath_git_map.hpp @@ -26,10 +26,14 @@ struct FpathInfo { std::filesystem::path fpath{}; /* key */ // create root based on "special" pragma value std::optional<PragmaSpecial> pragma_special{std::nullopt}; /* key */ + // create an absent root + bool absent{}; /* key */ [[nodiscard]] auto operator==(const FpathInfo& other) const noexcept -> bool { - return fpath == other.fpath and pragma_special == other.pragma_special; + return fpath == other.fpath and + pragma_special == other.pragma_special and + absent == other.absent; } }; @@ -51,6 +55,7 @@ struct hash<FpathInfo> { size_t seed{}; hash_combine<std::filesystem::path>(&seed, ct.fpath); hash_combine<std::optional<PragmaSpecial>>(&seed, ct.pragma_special); + hash_combine<bool>(&seed, ct.absent); return seed; } }; |