diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-05-09 13:16:20 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-04 14:34:44 +0200 |
commit | 8970cd4cbd4d75322d3c6132c6b440b194dcca89 (patch) | |
tree | bf19f9079a3668ec2e7fecddc9ac6eb227c52966 /src/buildtool/file_system/git_cas.hpp | |
parent | ecb6a45bf6d97000519b567d2e5269fffce780dd (diff) | |
download | justbuild-8970cd4cbd4d75322d3c6132c6b440b194dcca89.tar.gz |
git_cas read object: allow validation of individual blobs
This allows individual blobs read to be checked, e.g., for upwards
symlinks, also when not part of a tree, which performs such a
validation for its entries during its parsing into a GitTree.
Diffstat (limited to 'src/buildtool/file_system/git_cas.hpp')
-rw-r--r-- | src/buildtool/file_system/git_cas.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildtool/file_system/git_cas.hpp b/src/buildtool/file_system/git_cas.hpp index 299f7a2f..23fc4c14 100644 --- a/src/buildtool/file_system/git_cas.hpp +++ b/src/buildtool/file_system/git_cas.hpp @@ -65,10 +65,13 @@ class GitCAS { /// \brief Read object from CAS. /// \param id The object id. /// \param is_hex_id Specify whether `id` is hex string or raw. + /// \param as_valid_symlink Specify whether to treat any read blob as a + /// valid symlink and check for non-upwardness. /// \param log_failure Log level at which to log failures accessing the /// object. [[nodiscard]] auto ReadObject(std::string const& id, bool is_hex_id, + bool as_valid_symlink = false, LogLevel log_failure = LogLevel::Warning) const noexcept -> std::optional<std::string>; |