diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 17:27:13 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:01:13 +0200 |
commit | dd23c6e397584f4bf1cf84a73d9c382a8ff81de7 (patch) | |
tree | 0f0f600a4674a03da42c07f4ea016ff3c2dc578e /src/buildtool/execution_api/local/local_api.hpp | |
parent | beb3faa6956b9bfd58d4ea6644a9b2987409aaba (diff) | |
download | justbuild-dd23c6e397584f4bf1cf84a73d9c382a8ff81de7.tar.gz |
Pass HashFunction to ArtifactDigest::Create
Diffstat (limited to 'src/buildtool/execution_api/local/local_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_api.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index 5f8fb6a4..e8ba0831 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -34,6 +34,7 @@ #include "src/buildtool/common/repository_config.hpp" #include "src/buildtool/compatibility/compatibility.hpp" #include "src/buildtool/compatibility/native_support.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp" #include "src/buildtool/execution_api/common/artifact_blob_container.hpp" #include "src/buildtool/execution_api/common/blob_tree.hpp" @@ -214,8 +215,10 @@ class LocalApi final : public IExecutionApi { // storage_.ReadTreeInfos() will contain 0 as size. ArtifactDigest digest = IsTreeObject(info.type) - ? ArtifactDigest::Create<ObjectType::Tree>(*content) - : ArtifactDigest::Create<ObjectType::File>(*content); + ? ArtifactDigest::Create<ObjectType::Tree>( + HashFunction::Instance(), *content) + : ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), *content); // Collect blob and upload to remote CAS if transfer size reached. if (not UpdateContainerAndUpload<ArtifactDigest>( |