diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-12 14:54:25 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:02:34 +0200 |
commit | 7caf8d3fc009c34b6a1484eac4cbd1b697a2e3c4 (patch) | |
tree | 906f0e5b0d32f2bcd23387a403662ea663ad73a3 /src/buildtool/common/repository_config.hpp | |
parent | 87c3c1958b375f33526afd2cfa604b83ad88e0f0 (diff) | |
download | justbuild-7caf8d3fc009c34b6a1484eac4cbd1b697a2e3c4.tar.gz |
Use HashFunction from Storage in RepositoryConfig
Diffstat (limited to 'src/buildtool/common/repository_config.hpp')
-rw-r--r-- | src/buildtool/common/repository_config.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/buildtool/common/repository_config.hpp b/src/buildtool/common/repository_config.hpp index 8c5c29a5..34918d51 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/crypto/hash_function.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/git_cas.hpp" #include "src/buildtool/multithreading/atomic_value.hpp" @@ -187,10 +188,12 @@ class RepositoryConfig { return nullptr; } - [[nodiscard]] auto DeduplicateRepo(std::string const& repo) const - -> std::string const&; + [[nodiscard]] auto DeduplicateRepo(std::string const& repo, + HashFunction hash_function) const + -> std::string; - [[nodiscard]] auto BuildGraphForRepository(std::string const& repo) const + [[nodiscard]] auto BuildGraphForRepository(std::string const& repo, + HashFunction hash_function) const -> std::optional<nlohmann::json>; [[nodiscard]] auto AddToGraphAndGetId( @@ -198,7 +201,8 @@ class RepositoryConfig { gsl::not_null<int*> const& id_counter, gsl::not_null<std::unordered_map<std::string, std::string>*> const& repo_ids, - std::string const& repo) const -> std::optional<std::string>; + std::string const& repo, + HashFunction hash_function) const -> std::optional<std::string>; }; #endif // INCLUDED_SRC_BUILDTOOL_COMMON_REPOSITORY_CONFIG_HPP |