From d40eb82b519fb17819c8e8f0827f7338bed02bf7 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 5 Dec 2024 12:22:22 +0100 Subject: execution api: support retrieving from more than one API, also for fd Extend the api to optionally accept a different API for preferred fetching. This is already supported when fetching to a file path; therefore, extend to keep the interface symmetric. --- src/buildtool/execution_api/git/git_api.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/git/git_api.hpp') diff --git a/src/buildtool/execution_api/git/git_api.hpp b/src/buildtool/execution_api/git/git_api.hpp index a02f577e..64e3bd16 100644 --- a/src/buildtool/execution_api/git/git_api.hpp +++ b/src/buildtool/execution_api/git/git_api.hpp @@ -117,10 +117,13 @@ class GitApi final : public IExecutionApi { return true; } + // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector const& artifacts_info, std::vector const& fds, - bool raw_tree) const noexcept -> bool override { + bool raw_tree, + IExecutionApi const* /*alternative*/ = nullptr) const noexcept + -> bool override { if (artifacts_info.size() != fds.size()) { Logger::Log(LogLevel::Error, "different number of digests and file descriptors."); -- cgit v1.2.3