diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2022-07-08 10:13:29 +0200 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2022-08-05 14:41:31 +0200 |
commit | ee56ad123c7d6eeec98c586df1976dfb6a624586 (patch) | |
tree | 47f85941321ef016badbb6ef16ebff35b653dba2 /src/buildtool/file_system/git_tree.hpp | |
parent | bb2375008f69bf62d510ce862f1d4370fa130ef3 (diff) | |
download | justbuild-ee56ad123c7d6eeec98c586df1976dfb6a624586.tar.gz |
Git tree can return its raw string data
Diffstat (limited to 'src/buildtool/file_system/git_tree.hpp')
-rw-r--r-- | src/buildtool/file_system/git_tree.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buildtool/file_system/git_tree.hpp b/src/buildtool/file_system/git_tree.hpp index 25218634..fa4f83d6 100644 --- a/src/buildtool/file_system/git_tree.hpp +++ b/src/buildtool/file_system/git_tree.hpp @@ -48,6 +48,7 @@ class GitTree { [[nodiscard]] auto Hash() const noexcept { return ToHexString(raw_id_); } [[nodiscard]] auto RawHash() const noexcept { return raw_id_; } [[nodiscard]] auto Size() const noexcept -> std::optional<std::size_t>; + [[nodiscard]] auto RawData() const noexcept -> std::optional<std::string>; private: gsl::not_null<GitCASPtr> cas_; @@ -101,6 +102,7 @@ class GitTreeEntry { // Use with care. Implementation might read entire object to obtain // size. Consider using Blob()->size() instead. [[nodiscard]] auto Size() const noexcept -> std::optional<std::size_t>; + [[nodiscard]] auto RawData() const noexcept -> std::optional<std::string>; private: gsl::not_null<GitCASPtr> cas_; |