From dd23c6e397584f4bf1cf84a73d9c382a8ff81de7 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 5 Jul 2024 17:27:13 +0200 Subject: Pass HashFunction to ArtifactDigest::Create --- src/buildtool/execution_api/local/local_api.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/local/local_api.hpp') 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(*content) - : ArtifactDigest::Create(*content); + ? ArtifactDigest::Create( + HashFunction::Instance(), *content) + : ArtifactDigest::Create( + HashFunction::Instance(), *content); // Collect blob and upload to remote CAS if transfer size reached. if (not UpdateContainerAndUpload( -- cgit v1.2.3