diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 16:41:52 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:02:34 +0200 |
commit | 21014f3be3e4f8ebf34243f4f10841f0fb0b3843 (patch) | |
tree | 1208031cead9f9ca78d0f13a273f8242c045f3fc /test | |
parent | b2f51059cc034f03c70df28a5597a591ed3e5c5d (diff) | |
download | justbuild-21014f3be3e4f8ebf34243f4f10841f0fb0b3843.tar.gz |
Rename HashFunction methods and enums
Diffstat (limited to 'test')
14 files changed, 86 insertions, 88 deletions
diff --git a/test/buildtool/build_engine/target_map/target_map.test.cpp b/test/buildtool/build_engine/target_map/target_map.test.cpp index c64bb306..18927cf4 100644 --- a/test/buildtool/build_engine/target_map/target_map.test.cpp +++ b/test/buildtool/build_engine/target_map/target_map.test.cpp @@ -960,15 +960,13 @@ TEST_CASE("built-in rules", "[target_map]") { CHECK(!error); CHECK(error_msg == "NONE"); CHECK(bar_result->Artifacts()->ToJson()["foo.txt."]["type"] == "KNOWN"); - CHECK(bar_result->Artifacts()->ToJson()["foo.txt."]["data"]["id"] == - storage_config.Get() - .hash_function.ComputeBlobHash("bar") - .HexString()); + CHECK( + bar_result->Artifacts()->ToJson()["foo.txt."]["data"]["id"] == + storage_config.Get().hash_function.HashBlobData("bar").HexString()); CHECK(baz_result->Artifacts()->ToJson()["foo.txt."]["type"] == "KNOWN"); - CHECK(baz_result->Artifacts()->ToJson()["foo.txt."]["data"]["id"] == - storage_config.Get() - .hash_function.ComputeBlobHash("baz") - .HexString()); + CHECK( + baz_result->Artifacts()->ToJson()["foo.txt."]["data"]["id"] == + storage_config.Get().hash_function.HashBlobData("baz").HexString()); } } diff --git a/test/buildtool/crypto/hash_function.test.cpp b/test/buildtool/crypto/hash_function.test.cpp index 209f16a6..61c92eb9 100644 --- a/test/buildtool/crypto/hash_function.test.cpp +++ b/test/buildtool/crypto/hash_function.test.cpp @@ -21,17 +21,17 @@ TEST_CASE("Hash Function", "[crypto]") { std::string bytes{"test"}; - SECTION("Native") { - HashFunction const hash_function{HashFunction::JustHash::Native}; + SECTION("GitSHA1") { + HashFunction const hash_function{HashFunction::Type::GitSHA1}; // same as: echo -n test | sha1sum - CHECK(hash_function.ComputeHash(bytes).HexString() == + CHECK(hash_function.PlainHashData(bytes).HexString() == "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"); // same as: echo -n test | git hash-object --stdin - CHECK(hash_function.ComputeBlobHash(bytes).HexString() == + CHECK(hash_function.HashBlobData(bytes).HexString() == "30d74d258442c7c65512eafab474568dd706c430"); // same as: echo -n test | git hash-object -t "tree" --stdin --literally - CHECK(hash_function.ComputeTreeHash(bytes).HexString() == + CHECK(hash_function.HashTreeData(bytes).HexString() == "5f0ecc1a989593005e80f457446133250fcc43cc"); auto hasher = hash_function.MakeHasher(); @@ -40,18 +40,18 @@ TEST_CASE("Hash Function", "[crypto]") { "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"); } - SECTION("Compatible") { - HashFunction const hash_function{HashFunction::JustHash::Compatible}; + SECTION("PlainSHA256") { + HashFunction const hash_function{HashFunction::Type::PlainSHA256}; // all same as: echo -n test | sha256sum CHECK( - hash_function.ComputeHash(bytes).HexString() == + hash_function.PlainHashData(bytes).HexString() == "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"); CHECK( - hash_function.ComputeBlobHash(bytes).HexString() == + hash_function.HashBlobData(bytes).HexString() == "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"); CHECK( - hash_function.ComputeTreeHash(bytes).HexString() == + hash_function.HashTreeData(bytes).HexString() == "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"); auto hasher = hash_function.MakeHasher(); diff --git a/test/buildtool/execution_api/bazel/bazel_api.test.cpp b/test/buildtool/execution_api/bazel/bazel_api.test.cpp index 42d4880e..3ebee8d2 100644 --- a/test/buildtool/execution_api/bazel/bazel_api.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_api.test.cpp @@ -64,8 +64,8 @@ TEST_CASE("BazelAPI: No input, no output", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -80,8 +80,8 @@ TEST_CASE("BazelAPI: No input, create output", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -96,8 +96,8 @@ TEST_CASE("BazelAPI: One input copied to output", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -112,8 +112,8 @@ TEST_CASE("BazelAPI: Non-zero exit code, create output", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -129,8 +129,8 @@ TEST_CASE("BazelAPI: Retrieve two identical trees to path", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -147,8 +147,8 @@ TEST_CASE("BazelAPI: Retrieve file and symlink with same content to path", REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -164,8 +164,8 @@ TEST_CASE("BazelAPI: Retrieve mixed blobs and trees", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; @@ -181,8 +181,8 @@ TEST_CASE("BazelAPI: Create directory prior to execution", "[execution_api]") { REQUIRE(auth); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; FactoryApi api_factory{ &*remote_config->remote_address, &*auth, hash_function}; diff --git a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp index 86cee26a..103c7be3 100644 --- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp @@ -48,9 +48,9 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { SECTION("Valid digest and blob") { // digest of "test" - HashFunction const hash_function{ - Compatibility::IsCompatible() ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + HashFunction const hash_function{Compatibility::IsCompatible() + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto digest = ArtifactDigest::Create<ObjectType::File>(hash_function, content); diff --git a/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp index 87bf48cd..d569f884 100644 --- a/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp @@ -31,8 +31,8 @@ TEST_CASE("Bazel internals: Execution Client", "[execution_api]") { std::string content("test"); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto test_digest = static_cast<bazel_re::Digest>( ArtifactDigest::Create<ObjectType::File>(hash_function, content)); @@ -115,8 +115,8 @@ TEST_CASE("Bazel internals: Execution Client using env variables", std::string content("contents of env variable"); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto test_digest = static_cast<bazel_re::Digest>( ArtifactDigest::Create<ObjectType::File>(hash_function, content)); diff --git a/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp b/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp index 849f4485..fa6c3d4d 100644 --- a/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp @@ -38,8 +38,8 @@ TEST_CASE("Bazel internals: MessageFactory", "[execution_api]") { REQUIRE(FileSystemManager::CreateSymlink("file1", link)); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; // create the corresponding blobs auto file1_blob = CreateBlobFromPath(file1, hash_function); diff --git a/test/buildtool/execution_api/bazel/bazel_network.test.cpp b/test/buildtool/execution_api/bazel/bazel_network.test.cpp index 7dfd0ffa..1103c52b 100644 --- a/test/buildtool/execution_api/bazel/bazel_network.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_network.test.cpp @@ -46,8 +46,8 @@ TEST_CASE("Bazel network: write/read blobs", "[execution_api]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto network = BazelNetwork{instance_name, remote_config->remote_address->host, @@ -113,8 +113,8 @@ TEST_CASE("Bazel network: read blobs with unknown size", "[execution_api]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto network = BazelNetwork{instance_name, remote_config->remote_address->host, diff --git a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp index aa08cc7f..dbf965dd 100644 --- a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp @@ -45,8 +45,8 @@ TEST_CASE("ByteStream Client: Transfer single blob", "[execution_api]") { auto uuid = CreateUUIDVersion4(*CreateProcessUniqueId()); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; SECTION("Upload small blob") { std::string instance_name{"remote-execution"}; @@ -135,8 +135,8 @@ TEST_CASE("ByteStream Client: Transfer multiple blobs", "[execution_api]") { auto uuid = CreateUUIDVersion4(*CreateProcessUniqueId()); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; SECTION("Upload small blobs") { std::string instance_name{"remote-execution"}; diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp index 81a11364..6d8e7928 100644 --- a/test/buildtool/execution_api/common/api_test.hpp +++ b/test/buildtool/execution_api/common/api_test.hpp @@ -132,8 +132,8 @@ using ExecProps = std::map<std::string, std::string>; std::string test_content("test"); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto test_digest = ArtifactDigest::Create<ObjectType::File>(hash_function, test_content); @@ -215,8 +215,8 @@ using ExecProps = std::map<std::string, std::string>; std::string test_content("test"); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto test_digest = ArtifactDigest::Create<ObjectType::File>(hash_function, test_content); @@ -305,8 +305,8 @@ using ExecProps = std::map<std::string, std::string>; std::string test_content("test"); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto test_digest = ArtifactDigest::Create<ObjectType::File>(hash_function, test_content); diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index 6a71f497..dcdfd2dd 100644 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -273,8 +273,8 @@ TEST_CASE("Executor: Process artifact", "[executor]") { auto [config, repo_config] = CreateTest(&g, workspace_path); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto const local_cpp_id = ArtifactDescription::CreateLocal("local.cpp", "").Id(); @@ -360,8 +360,8 @@ TEST_CASE("Executor: Process action", "[executor]") { auto [config, repo_config] = CreateTest(&g, workspace_path); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto const local_cpp_id = ArtifactDescription::CreateLocal("local.cpp", "").Id(); diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp index 4990e805..e49ab4c4 100644 --- a/test/buildtool/execution_engine/executor/executor_api.test.hpp +++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp @@ -53,12 +53,12 @@ static inline void RunBlobUpload(RepositoryConfig* repo_config, SetupConfig(repo_config); auto api = factory(); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; std::string const blob = "test"; CHECK(api->Upload(ArtifactBlobContainer{{ArtifactBlob{ - ArtifactDigest{hash_function.ComputeBlobHash(blob).HexString(), + ArtifactDigest{hash_function.HashBlobData(blob).HexString(), blob.size(), /*is_tree=*/false}, blob, @@ -139,8 +139,8 @@ static inline void RunHelloWorldCompilation( RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto api = factory(); Executor runner{repo_config, @@ -273,8 +273,8 @@ static inline void RunGreeterCompilation( RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto api = factory(); Executor runner{repo_config, @@ -416,17 +416,17 @@ static inline void TestUploadAndDownloadTrees( } HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto foo = std::string{"foo"}; auto bar = std::string{"bar"}; auto foo_digest = - ArtifactDigest{hash_function.ComputeBlobHash(foo).HexString(), + ArtifactDigest{hash_function.HashBlobData(foo).HexString(), foo.size(), /*is_tree=*/false}; auto bar_digest = - ArtifactDigest{hash_function.ComputeBlobHash(bar).HexString(), + ArtifactDigest{hash_function.HashBlobData(bar).HexString(), bar.size(), /*is_tree=*/false}; @@ -575,8 +575,8 @@ static inline void TestRetrieveOutputDirectories( auto tmpdir = GetTestDir(); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto const make_tree_id = std::string{"make_tree"}; auto const* make_tree_cmd = diff --git a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp index f97de299..0e068ea9 100644 --- a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp +++ b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp @@ -42,8 +42,8 @@ TEST_CASE("Executor<BazelApi>: Upload blob", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestBlobUpload(&repo_config, [&] { return BazelApi::Ptr{new BazelApi{"remote-execution", @@ -73,8 +73,8 @@ TEST_CASE("Executor<BazelApi>: Compile hello world", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestHelloWorldCompilation( &repo_config, @@ -111,8 +111,8 @@ TEST_CASE("Executor<BazelApi>: Compile greeter", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestGreeterCompilation( &repo_config, @@ -149,8 +149,8 @@ TEST_CASE("Executor<BazelApi>: Upload and download trees", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestUploadAndDownloadTrees( &repo_config, @@ -187,8 +187,8 @@ TEST_CASE("Executor<BazelApi>: Retrieve output directories", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestRetrieveOutputDirectories( &repo_config, diff --git a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp index fa8202ce..d92b9ef9 100644 --- a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp +++ b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp @@ -35,8 +35,8 @@ StorageConfig::Builder builder; auto config = builder.SetBuildRoot(cache_dir) .SetHashType(Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native) + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1) .SetRemoteExecutionArgs(remote_config.remote_address, remote_config.platform_properties, remote_config.dispatch) diff --git a/test/utils/hermeticity/test_storage_config.hpp b/test/utils/hermeticity/test_storage_config.hpp index 26dc53df..4bcbc1be 100644 --- a/test/utils/hermeticity/test_storage_config.hpp +++ b/test/utils/hermeticity/test_storage_config.hpp @@ -54,8 +54,8 @@ class TestStorageConfig final { StorageConfig::Builder builder; auto config = builder.SetBuildRoot(temp_dir->GetPath()) .SetHashType(Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native) + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1) .Build(); if (not config) { Logger::Log(LogLevel::Error, config.error()); |