From bed4f4d7c81420832b05acaf9259b50458792b74 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 22 May 2025 17:22:25 +0200 Subject: GitRepo: Add tree reader without symlink checker --- src/buildtool/file_system/git_repo.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/buildtool/file_system/git_repo.hpp') diff --git a/src/buildtool/file_system/git_repo.hpp b/src/buildtool/file_system/git_repo.hpp index f8591d75..c559cbba 100644 --- a/src/buildtool/file_system/git_repo.hpp +++ b/src/buildtool/file_system/git_repo.hpp @@ -105,6 +105,19 @@ class GitRepo { [[nodiscard]] auto IsRepoFake() const noexcept -> bool; + /// \brief Read entries from tree in CAS. + /// Reading a tree must be backed by an object database. Therefore, a real + /// repository is required. + /// \param id The object id. + /// \param is_hex_id Specify whether `id` is hex string or raw. + /// \param ignore_special If set, treat symlinks as absent. + /// \note This method does not perform any content-based validity checks on + /// the read entries. For reading with symlinks validation use ReadTree(). + [[nodiscard]] auto ReadDirectTree(std::string const& id, + bool is_hex_id = false, + bool ignore_special = false) + const noexcept -> std::optional; + /// \brief Read entries from tree in CAS. /// Reading a tree must be backed by an object database. Therefore, a real /// repository is required. -- cgit v1.2.3