From c60eb6dfb22f28f638caff578b8815d3c4753bdc Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 5 Apr 2024 16:18:28 +0200 Subject: Add KeepTree to critical Git operations Also improves and extends accordingly the Git operations tests. --- src/other_tools/git_operations/git_operations.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/other_tools/git_operations/git_operations.hpp') diff --git a/src/other_tools/git_operations/git_operations.hpp b/src/other_tools/git_operations/git_operations.hpp index e034664e..44eec96a 100644 --- a/src/other_tools/git_operations/git_operations.hpp +++ b/src/other_tools/git_operations/git_operations.hpp @@ -53,6 +53,14 @@ class CriticalGitOps { [[nodiscard]] static auto GitGetHeadId( GitOpParams const& crit_op_params, AsyncMapConsumerLoggerPtr const& logger) -> GitOpValue; + + // This operation needs the params: target_path, git_hash (tree), message + // Called after resolving symlinks in a tree to retain the resolved tree + // by tagging it. Assumes folder exists. + // It guarantees the logger is called exactly once with fatal if failure. + [[nodiscard]] static auto GitKeepTree( + GitOpParams const& crit_op_params, + AsyncMapConsumerLoggerPtr const& logger) -> GitOpValue; }; #endif // INCLUDED_SRC_OTHER_TOOLS_GIT_OPERATIONS_GIT_OPERATIONS_HPP \ No newline at end of file -- cgit v1.2.3