diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-10 12:16:35 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-11 14:52:07 +0200 |
commit | b716a901802314ad57588b4b75f9ea785219827a (patch) | |
tree | f704079ca50740ac6e4e07d2ce90ec992250f489 /src/buildtool/common/repository_config.hpp | |
parent | 60be90f22c17ff113339bae5915c372ac26348ba (diff) | |
download | justbuild-b716a901802314ad57588b4b75f9ea785219827a.tar.gz |
Return ArtifactDigest from RepositoryConfig::RepositoryKey
...to prevent additional conversions to ArtifactDigest from plain strings.
Diffstat (limited to 'src/buildtool/common/repository_config.hpp')
-rw-r--r-- | src/buildtool/common/repository_config.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/common/repository_config.hpp b/src/buildtool/common/repository_config.hpp index 34918d51..3319a710 100644 --- a/src/buildtool/common/repository_config.hpp +++ b/src/buildtool/common/repository_config.hpp @@ -25,6 +25,7 @@ #include "gsl/gsl" #include "nlohmann/json.hpp" +#include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/git_cas.hpp" @@ -140,7 +141,7 @@ class RepositoryConfig { // std::nullopt otherwise. [[nodiscard]] auto RepositoryKey(Storage const& storage, std::string const& repo) const noexcept - -> std::optional<std::string>; + -> std::optional<ArtifactDigest>; // used for testing void Reset() { @@ -159,7 +160,7 @@ class RepositoryConfig { // Base description if content-fixed std::optional<nlohmann::json> base_desc{}; // Cache key if content-fixed - AtomicValue<std::optional<std::string>> key{}; + AtomicValue<std::optional<ArtifactDigest>> key{}; }; std::unordered_map<std::string, RepositoryData> repos_; |