From 8d4f583d63c657397583f778096b8bcb6d96c12f Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 26 May 2025 10:41:15 +0200 Subject: Add utility methods for caching valid trees ...through marker files kept in storage under generation regime. These can be used to allow valid source trees, i.e., those free of upwards symlinks, to be cached in a persistent manner over multiple builds. --- src/buildtool/storage/fs_utils.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/buildtool/storage/fs_utils.hpp') diff --git a/src/buildtool/storage/fs_utils.hpp b/src/buildtool/storage/fs_utils.hpp index 8cc23b69..a03cc4dd 100644 --- a/src/buildtool/storage/fs_utils.hpp +++ b/src/buildtool/storage/fs_utils.hpp @@ -89,6 +89,12 @@ namespace StorageUtils { std::size_t generation = 0) noexcept -> std::filesystem::path; +/// \brief Get the path to the file marking a known valid Git tree. +[[nodiscard]] auto GetValidTreesMarkerFile(StorageConfig const& storage_config, + std::string const& tree_hash, + std::size_t generation = 0) noexcept + -> std::filesystem::path; + /// \brief Write a tree id to file. The parent folder of the file must exist! [[nodiscard]] auto WriteTreeIDFile(std::filesystem::path const& tree_id_file, std::string const& tree_id) noexcept -> bool; -- cgit v1.2.3