diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-04-05 16:18:28 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-04-10 15:25:45 +0200 |
commit | c60eb6dfb22f28f638caff578b8815d3c4753bdc (patch) | |
tree | 86218d88394db7585377a0eb13a329101e79bd4a /src/other_tools/git_operations/git_operations.hpp | |
parent | d3ec6b7294d44e1cd524ac5bbb9048d415950e99 (diff) | |
download | justbuild-c60eb6dfb22f28f638caff578b8815d3c4753bdc.tar.gz |
Add KeepTree to critical Git operations
Also improves and extends accordingly the Git operations tests.
Diffstat (limited to 'src/other_tools/git_operations/git_operations.hpp')
-rw-r--r-- | src/other_tools/git_operations/git_operations.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 |