From 4f7d0c2af84d25a8b8b7a5c0ad7b58d94b4c8f7c Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 12 Sep 2024 12:24:59 +0200 Subject: Check compatibility in Executor based on the hash type --- src/buildtool/execution_engine/executor/executor.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_engine/executor/executor.hpp') diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 5a1eb857..4b2548da 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -213,6 +213,7 @@ class ExecutorImpl { } if (not VerifyOrUploadKnownArtifact( + apis.hash_function.GetType(), *apis.remote, artifact->Content().Repository(), repo_config, @@ -433,11 +434,12 @@ class ExecutorImpl { /// \param info The info of the object /// \returns true on success [[nodiscard]] static auto VerifyOrUploadKnownArtifact( + HashFunction::Type hash_type, IExecutionApi const& api, std::string const& repo, gsl::not_null const& repo_config, Artifact::ObjectInfo const& info) noexcept -> bool { - if (ProtocolTraits::Instance().IsCompatible()) { + if (not ProtocolTraits::IsNative(hash_type)) { auto opt = GitHashesConverter::Instance().GetGitEntry(info.digest.hash()); if (opt) { -- cgit v1.2.3