From ecb6a45bf6d97000519b567d2e5269fffce780dd Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 9 May 2025 12:58:17 +0200 Subject: git_cas: Be explicit in hash type (raw or hex) when reading --- src/buildtool/file_system/git_tree.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/buildtool/file_system/git_tree.cpp') diff --git a/src/buildtool/file_system/git_tree.cpp b/src/buildtool/file_system/git_tree.cpp index 3d1418f1..ded027c2 100644 --- a/src/buildtool/file_system/git_tree.cpp +++ b/src/buildtool/file_system/git_tree.cpp @@ -124,21 +124,21 @@ auto GitTree::LookupEntryByPath( } auto GitTree::Size() const noexcept -> std::optional { - if (auto header = cas_->ReadHeader(raw_id_)) { + if (auto header = cas_->ReadHeader(raw_id_, /*is_hex_id=*/false)) { return header->first; } return std::nullopt; } auto GitTree::RawData() const noexcept -> std::optional { - return cas_->ReadObject(raw_id_); + return cas_->ReadObject(raw_id_, /*is_hex_id=*/false); } auto GitTreeEntry::Blob() const noexcept -> std::optional { if (not IsBlob()) { return std::nullopt; } - return cas_->ReadObject(raw_id_); + return cas_->ReadObject(raw_id_, /*is_hex_id=*/false); } auto GitTreeEntry::Tree(bool ignore_special) const& noexcept @@ -164,12 +164,12 @@ auto GitTreeEntry::Tree(bool ignore_special) const& noexcept } auto GitTreeEntry::Size() const noexcept -> std::optional { - if (auto header = cas_->ReadHeader(raw_id_)) { + if (auto header = cas_->ReadHeader(raw_id_, /*is_hex_id=*/false)) { return header->first; } return std::nullopt; } auto GitTreeEntry::RawData() const noexcept -> std::optional { - return cas_->ReadObject(raw_id_); + return cas_->ReadObject(raw_id_, /*is_hex_id=*/false); } -- cgit v1.2.3