summaryrefslogtreecommitdiff
path: root/src/buildtool/common/bazel_digest_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/common/bazel_digest_factory.cpp')
-rw-r--r--src/buildtool/common/bazel_digest_factory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buildtool/common/bazel_digest_factory.cpp b/src/buildtool/common/bazel_digest_factory.cpp
index 4ff885aa..3a1f8519 100644
--- a/src/buildtool/common/bazel_digest_factory.cpp
+++ b/src/buildtool/common/bazel_digest_factory.cpp
@@ -16,12 +16,13 @@
#include <utility>
+#include "src/buildtool/common/protocol_traits.hpp"
#include "src/buildtool/crypto/hasher.hpp"
auto BazelDigestFactory::Create(HashInfo const& hash_info,
std::int64_t size) noexcept
-> bazel_re::Digest {
- auto hash = hash_info.HashType() == HashFunction::Type::GitSHA1
+ auto hash = ProtocolTraits::IsNative(hash_info.HashType())
? Prefix(hash_info.Hash(), hash_info.IsTree())
: hash_info.Hash();