From c889b852a652115f4a6936a96ebdee9410571997 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 19 Aug 2024 16:01:16 +0200 Subject: GitOps: Pass source directory to GitInitialCommit operation While there, ensure optional Git operation parameters are checked before use for the operations that require them. --- test/other_tools/git_operations/critical_git_ops.test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/other_tools/git_operations/critical_git_ops.test.cpp') diff --git a/test/other_tools/git_operations/critical_git_ops.test.cpp b/test/other_tools/git_operations/critical_git_ops.test.cpp index ac1f371c..c1494bcf 100644 --- a/test/other_tools/git_operations/critical_git_ops.test.cpp +++ b/test/other_tools/git_operations/critical_git_ops.test.cpp @@ -173,7 +173,8 @@ TEST_CASE("Critical git operations", "[critical_git_op_map]") { { path_init_commit, // target_path "", // git_hash - "Init commit" // message + "Init commit", // message + path_init_commit // source_path }, .op_type = GitOpType::INITIAL_COMMIT}, GitOpKey{.params = @@ -181,6 +182,7 @@ TEST_CASE("Critical git operations", "[critical_git_op_map]") { path_init_bare, // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}, @@ -189,6 +191,7 @@ TEST_CASE("Critical git operations", "[critical_git_op_map]") { path_init_non_bare, // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path false // init_bare }, .op_type = GitOpType::ENSURE_INIT}, -- cgit v1.2.3