diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-11 17:00:55 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-13 14:41:00 +0200 |
commit | 371d4357eeaa498541473b18bd092975d05fb930 (patch) | |
tree | ad45de176d1f176ae3031942b74ca23921b46a3d /src/buildtool/execution_api/local/local_action.cpp | |
parent | 514b0f1b7a731e90a1be46f14fa12130e31246dc (diff) | |
download | justbuild-371d4357eeaa498541473b18bd092975d05fb930.tar.gz |
Check compatibility in LocalAPI based on the hash type
Diffstat (limited to 'src/buildtool/execution_api/local/local_action.cpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_action.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<ArtifactDigest> { 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); } |