summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common/blob_tree.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-08-29 11:55:07 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-08-30 17:17:09 +0200
commit3a771602f8ee6c7940208d447463061aa9b6af8c (patch)
tree491e86926da47d9365a49a3ecdd35dbcd48c1364 /src/buildtool/execution_api/common/blob_tree.hpp
parent60daf819bbe7db97064c7e102acedbf3cd693410 (diff)
downloadjustbuild-3a771602f8ee6c7940208d447463061aa9b6af8c.tar.gz
Return the IsTree flag from ArtifactDigest
...and replace obvious redundant conversions to bazel_re::Digest, which were done to ensure that the digest represents a tree.
Diffstat (limited to 'src/buildtool/execution_api/common/blob_tree.hpp')
-rw-r--r--src/buildtool/execution_api/common/blob_tree.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/common/blob_tree.hpp b/src/buildtool/execution_api/common/blob_tree.hpp
index 25d0f560..051b0fe2 100644
--- a/src/buildtool/execution_api/common/blob_tree.hpp
+++ b/src/buildtool/execution_api/common/blob_tree.hpp
@@ -22,7 +22,6 @@
#include <vector>
#include "gsl/gsl"
-#include "src/buildtool/compatibility/native_support.hpp"
#include "src/buildtool/execution_api/bazel_msg/directory_tree.hpp"
#include "src/buildtool/execution_api/common/artifact_blob_container.hpp"
@@ -38,8 +37,7 @@ class BlobTree {
[[nodiscard]] auto Blob() const noexcept -> ArtifactBlob { return blob_; }
[[nodiscard]] auto IsTree() const noexcept -> bool {
- return NativeSupport::IsTree(
- static_cast<bazel_re::Digest>(blob_.digest).hash());
+ return blob_.digest.IsTree();
}
/// \brief Create a `BlobTree` from a `DirectoryTree`.