summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/file_root.hpp
diff options
context:
space:
mode:
authorSascha Roloff <sascha.roloff@huawei.com>2022-07-11 19:55:10 +0200
committerSascha Roloff <sascha.roloff@huawei.com>2022-08-05 14:41:31 +0200
commitee6f54124360d8a72b9b545dcc581f3c80d3c8a9 (patch)
tree20ab0e5e0e8132c30da0f99c401750d712fe00d0 /src/buildtool/file_system/file_root.hpp
parent76c17ffa9e079fdd3d2a7159c02a1d9593e11930 (diff)
downloadjustbuild-ee6f54124360d8a72b9b545dcc581f3c80d3c8a9.tar.gz
Modified artifact digest to provide wire digest on demand
Diffstat (limited to 'src/buildtool/file_system/file_root.hpp')
-rw-r--r--src/buildtool/file_system/file_root.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buildtool/file_system/file_root.hpp b/src/buildtool/file_system/file_root.hpp
index 747ca896..872ae1ff 100644
--- a/src/buildtool/file_system/file_root.hpp
+++ b/src/buildtool/file_system/file_root.hpp
@@ -399,6 +399,7 @@ class FileRoot {
}
// Create LOCAL or KNOWN artifact. Does not check existence for LOCAL.
+ // `file_path` must reference a blob.
[[nodiscard]] auto ToArtifactDescription(
std::filesystem::path const& file_path,
std::string const& repository) const noexcept
@@ -412,11 +413,14 @@ class FileRoot {
auto compatible_hash = Compatibility::RegisterGitEntry(
entry->Hash(), *entry->Blob(), repository);
return ArtifactDescription{
- ArtifactDigest{compatible_hash, *entry->Size()},
+ ArtifactDigest{compatible_hash,
+ *entry->Size(),
+ /*is_tree=*/false},
entry->Type()};
}
return ArtifactDescription{
- ArtifactDigest{entry->Hash(), *entry->Size()},
+ ArtifactDigest{
+ entry->Hash(), *entry->Size(), /*is_tree=*/false},
entry->Type(),
repository};
}