diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-05-09 12:58:17 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-04 14:34:44 +0200 |
commit | ecb6a45bf6d97000519b567d2e5269fffce780dd (patch) | |
tree | d947debc53778ff0d1b61f3af82d758730795df3 /src/buildtool/file_system/git_tree.cpp | |
parent | 314e28ee1a357a9b256e3c6c528c8a8a18989880 (diff) | |
download | justbuild-ecb6a45bf6d97000519b567d2e5269fffce780dd.tar.gz |
git_cas: Be explicit in hash type (raw or hex) when reading
Diffstat (limited to 'src/buildtool/file_system/git_tree.cpp')
-rw-r--r-- | src/buildtool/file_system/git_tree.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<std::size_t> { - 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<std::string> { - return cas_->ReadObject(raw_id_); + return cas_->ReadObject(raw_id_, /*is_hex_id=*/false); } auto GitTreeEntry::Blob() const noexcept -> std::optional<std::string> { 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<std::size_t> { - 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<std::string> { - return cas_->ReadObject(raw_id_); + return cas_->ReadObject(raw_id_, /*is_hex_id=*/false); } |