From beb3faa6956b9bfd58d4ea6644a9b2987409aaba Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 5 Jul 2024 16:49:45 +0200 Subject: Use HashFunction functionality via Instance() ...to track changes during refactoring easier. --- src/buildtool/serve_api/serve_service/source_tree.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp') diff --git a/src/buildtool/serve_api/serve_service/source_tree.cpp b/src/buildtool/serve_api/serve_service/source_tree.cpp index 29e9ade2..f86fdb45 100644 --- a/src/buildtool/serve_api/serve_service/source_tree.cpp +++ b/src/buildtool/serve_api/serve_service/source_tree.cpp @@ -25,6 +25,7 @@ #include "src/buildtool/common/artifact_digest.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/git/git_api.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/git_repo.hpp" @@ -1158,9 +1159,9 @@ auto SourceTreeService::ServeDistdirTree( kv.name(), std::make_pair(blob_digest, kv.executable())); } // get hash of distdir content; this must match with that in just-mr - auto content_id = - HashFunction::ComputeBlobHash(nlohmann::json(content_list).dump()) - .HexString(); + auto content_id = HashFunction::Instance() + .ComputeBlobHash(nlohmann::json(content_list).dump()) + .HexString(); // create in-memory tree of the distdir, now that we know we have all blobs auto tree = GitRepo::CreateShallowTree(entries); if (not tree) { -- cgit v1.2.3