From 240d3eb488947e57d690caf245e43eeef0cc7f1f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 3 Dec 2024 10:17:46 +0100 Subject: ArtifactsRoot: support rehash-function When constructing a git tree out of an artifact stage, support rehashing the artifact digests on the fly, so that artifact stages not based on GitSHA1 can be supported as well. --- src/buildtool/computed_roots/artifacts_root.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/buildtool/computed_roots/artifacts_root.hpp') diff --git a/src/buildtool/computed_roots/artifacts_root.hpp b/src/buildtool/computed_roots/artifacts_root.hpp index 6ed727fa..95b72877 100644 --- a/src/buildtool/computed_roots/artifacts_root.hpp +++ b/src/buildtool/computed_roots/artifacts_root.hpp @@ -19,6 +19,7 @@ #include #include "src/buildtool/build_engine/expression/expression_ptr.hpp" +#include "src/buildtool/execution_api/utils/rehash_utils.hpp" #include "src/buildtool/multithreading/async_map_consumer.hpp" /// \brief Compute to the git tree identifier, as hex string, corresponding to @@ -28,7 +29,8 @@ /// \param logger Logger to report problems; will be called with the fatal /// property in case of error auto ArtifactsRoot(ExpressionPtr const& stage, - AsyncMapConsumerLoggerPtr const& logger) - -> std::optional; + AsyncMapConsumerLoggerPtr const& logger, + std::optional const& rehash = + std::nullopt) -> std::optional; #endif -- cgit v1.2.3