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 /src/buildtool/storage/garbage_collector.cpp | |
parent | b2f51059cc034f03c70df28a5597a591ed3e5c5d (diff) | |
download | justbuild-21014f3be3e4f8ebf34243f4f10841f0fb0b3843.tar.gz |
Rename HashFunction methods and enums
Diffstat (limited to 'src/buildtool/storage/garbage_collector.cpp')
-rw-r--r-- | src/buildtool/storage/garbage_collector.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/buildtool/storage/garbage_collector.cpp b/src/buildtool/storage/garbage_collector.cpp index b03364f8..a108ae73 100644 --- a/src/buildtool/storage/garbage_collector.cpp +++ b/src/buildtool/storage/garbage_collector.cpp @@ -220,8 +220,8 @@ auto GarbageCollector::Compactify(StorageConfig const& storage_config, }); auto compactify = [threshold](StorageConfig const& config) -> bool { - Compatibility::SetCompatible(config.hash_function.GetHashType() == - HashFunction::JustHash::Compatible); + Compatibility::SetCompatible(config.hash_function.GetType() == + HashFunction::Type::PlainSHA256); auto const storage = ::Generation::Create(&config); return Compactifier::RemoveInvalid(storage.CAS()) and @@ -230,19 +230,19 @@ auto GarbageCollector::Compactify(StorageConfig const& storage_config, }; // Compactification must be done for both native and compatible storages. - static constexpr std::array kHashes = {HashFunction::JustHash::Native, - HashFunction::JustHash::Compatible}; + static constexpr std::array kHashes = {HashFunction::Type::GitSHA1, + HashFunction::Type::PlainSHA256}; auto builder = StorageConfig::Builder{} .SetBuildRoot(storage_config.build_root) .SetNumGenerations(storage_config.num_generations); - return std::all_of( - kHashes.begin(), - kHashes.end(), - [&builder, &compactify](HashFunction::JustHash hash_type) { - auto const config = builder.SetHashType(hash_type).Build(); - return config.has_value() and compactify(*config); - }); + return std::all_of(kHashes.begin(), + kHashes.end(), + [&builder, &compactify](HashFunction::Type hash_type) { + auto const config = + builder.SetHashType(hash_type).Build(); + return config.has_value() and compactify(*config); + }); } #endif // BOOTSTRAP_BUILD_TOOL |