From 371d4357eeaa498541473b18bd092975d05fb930 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 11 Sep 2024 17:00:55 +0200 Subject: Check compatibility in LocalAPI based on the hash type --- src/buildtool/execution_api/local/local_action.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/buildtool/execution_api/local/local_action.cpp') diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp index 701acea4..1f17ed08 100644 --- a/src/buildtool/execution_api/local/local_action.cpp +++ b/src/buildtool/execution_api/local/local_action.cpp @@ -70,10 +70,10 @@ class BuildCleanupAnchor { [&cas](std::string const& content) -> std::optional { return cas.StoreBlob(content); }; - return ProtocolTraits::Instance().IsCompatible() - ? BazelMsgFactory::CreateDirectoryDigestFromLocalTree( + return ProtocolTraits::IsNative(storage.GetHashFunction().GetType()) + ? BazelMsgFactory::CreateGitTreeDigestFromLocalTree( dir_path, store_blob, store_tree, store_symlink) - : BazelMsgFactory::CreateGitTreeDigestFromLocalTree( + : BazelMsgFactory::CreateDirectoryDigestFromLocalTree( dir_path, store_blob, store_tree, store_symlink); } -- cgit v1.2.3