summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/git
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/git')
-rw-r--r--src/buildtool/execution_api/git/git_api.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/buildtool/execution_api/git/git_api.hpp b/src/buildtool/execution_api/git/git_api.hpp
index b6a30a9b..470dca41 100644
--- a/src/buildtool/execution_api/git/git_api.hpp
+++ b/src/buildtool/execution_api/git/git_api.hpp
@@ -195,6 +195,9 @@ class GitApi final : public IExecutionApi {
return false;
}
+ // GitApi works in the native mode only.
+ HashFunction const hash_function{HashFunction::JustHash::Native};
+
// Collect blobs of missing artifacts from local CAS. Trees are
// processed recursively before any blob is uploaded.
ArtifactBlobContainer container{};
@@ -228,7 +231,7 @@ class GitApi final : public IExecutionApi {
return false;
}
auto digest = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), *entry_content);
+ hash_function, *entry_content);
// Collect blob and upload to remote CAS if transfer
// size reached.
if (not UpdateContainerAndUpload<ArtifactDigest>(
@@ -259,10 +262,10 @@ class GitApi final : public IExecutionApi {
ArtifactDigest digest =
IsTreeObject(info.type)
- ? ArtifactDigest::Create<ObjectType::Tree>(
- HashFunction::Instance(), *content)
- : ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), *content);
+ ? ArtifactDigest::Create<ObjectType::Tree>(hash_function,
+ *content)
+ : ArtifactDigest::Create<ObjectType::File>(hash_function,
+ *content);
// Collect blob and upload to remote CAS if transfer size reached.
if (not UpdateContainerAndUpload<ArtifactDigest>(