diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-08-29 11:55:07 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-08-30 17:17:09 +0200 |
commit | 3a771602f8ee6c7940208d447463061aa9b6af8c (patch) | |
tree | 491e86926da47d9365a49a3ecdd35dbcd48c1364 /src/buildtool/execution_api/execution_service | |
parent | 60daf819bbe7db97064c7e102acedbf3cd693410 (diff) | |
download | justbuild-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/execution_service')
-rw-r--r-- | src/buildtool/execution_api/execution_service/cas_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/execution_service/cas_server.cpp b/src/buildtool/execution_api/execution_service/cas_server.cpp index 9960dc96..a2a37e37 100644 --- a/src/buildtool/execution_api/execution_service/cas_server.cpp +++ b/src/buildtool/execution_api/execution_service/cas_server.cpp @@ -103,7 +103,7 @@ auto CASServiceImpl::FindMissingBlobs( logger_.Emit(LogLevel::Trace, "FindMissingBlobs: {}", hash); ArtifactDigest const digest(x); is_in_cas = - NativeSupport::IsTree(hash) + digest.IsTree() ? storage_.CAS().TreePath(digest).has_value() : storage_.CAS().BlobPath(digest, false).has_value(); } @@ -200,7 +200,7 @@ auto CASServiceImpl::BatchReadBlobs( ArtifactDigest const digest(x); auto const path = - NativeSupport::IsTree(x.hash()) + digest.IsTree() ? storage_.CAS().TreePath(digest) : storage_.CAS().BlobPath(digest, /*is_executable=*/false); |