summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-10 18:51:20 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-13 14:41:00 +0200
commitf60d39620b29aeaf1addeb244bdd6e15ddf4894c (patch)
tree2617d65884c975b3fc63dd48e58242ec36138246 /src/buildtool/file_system
parented8f24fb246142ffaa88707ae86b53c34df82986 (diff)
downloadjustbuild-f60d39620b29aeaf1addeb244bdd6e15ddf4894c.tar.gz
Rename Compatibility class to ProtocolTraits
...and move it to the common stage.
Diffstat (limited to 'src/buildtool/file_system')
-rw-r--r--src/buildtool/file_system/TARGETS2
-rw-r--r--src/buildtool/file_system/file_root.hpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/file_system/TARGETS b/src/buildtool/file_system/TARGETS
index 9d5be7a3..47c5e249 100644
--- a/src/buildtool/file_system/TARGETS
+++ b/src/buildtool/file_system/TARGETS
@@ -171,8 +171,8 @@
, ["src/buildtool/common", "common"]
, ["src/buildtool/common", "artifact_description"]
, ["src/buildtool/common", "artifact_digest_factory"]
+ , ["src/buildtool/common", "protocol_traits"]
, ["src/buildtool/crypto", "hash_function"]
- , ["src/buildtool/compatibility", "compatibility"]
, ["src/buildtool/logging", "log_level"]
, ["src/buildtool/logging", "logging"]
, ["@", "gsl", "", "gsl"]
diff --git a/src/buildtool/file_system/file_root.hpp b/src/buildtool/file_system/file_root.hpp
index 381f5c23..798d8341 100644
--- a/src/buildtool/file_system/file_root.hpp
+++ b/src/buildtool/file_system/file_root.hpp
@@ -29,7 +29,7 @@
#include "src/buildtool/common/artifact_digest.hpp"
#include "src/buildtool/common/artifact_digest_factory.hpp"
#include "src/buildtool/common/git_hashes_converter.hpp"
-#include "src/buildtool/compatibility/compatibility.hpp"
+#include "src/buildtool/common/protocol_traits.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/git_tree.hpp"
@@ -224,7 +224,7 @@ class FileRoot {
/// Only succeeds if no entries have to be ignored.
[[nodiscard]] auto AsKnownTree(std::string const& repository)
const noexcept -> std::optional<ArtifactDescription> {
- if (Compatibility::IsCompatible()) {
+ if (ProtocolTraits::Instance().IsCompatible()) {
return std::nullopt;
}
if (std::holds_alternative<tree_t>(data_)) {
@@ -584,7 +584,7 @@ class FileRoot {
std::get<git_root_t>(root_).tree->LookupEntryByPath(
file_path)) {
if (entry->IsBlob()) {
- if (Compatibility::IsCompatible()) {
+ if (ProtocolTraits::Instance().IsCompatible()) {
auto compatible_hash =
GitHashesConverter::Instance().RegisterGitEntry(
entry->Hash(), *entry->Blob(), repository);