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. --- src/other_tools/root_maps/commit_git_map.cpp | 2 ++ src/other_tools/root_maps/content_git_map.cpp | 3 +++ src/other_tools/root_maps/distdir_git_map.cpp | 1 + src/other_tools/root_maps/fpath_git_map.cpp | 1 + src/other_tools/root_maps/tree_id_git_map.cpp | 1 + 5 files changed, 8 insertions(+) (limited to 'src/other_tools/root_maps') diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp index 873f7484..2d64d599 100644 --- a/src/other_tools/root_maps/commit_git_map.cpp +++ b/src/other_tools/root_maps/commit_git_map.cpp @@ -691,6 +691,7 @@ void EnsureCommit(GitRepoInfo const& repo_info, storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; @@ -1102,6 +1103,7 @@ auto CreateCommitGitMap( repo_root, // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path not just_mr_paths->git_checkout_locations.contains( fetch_repo) // init_bare }, diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp index 38aa21a6..d0b9784c 100644 --- a/src/other_tools/root_maps/content_git_map.cpp +++ b/src/other_tools/root_maps/content_git_map.cpp @@ -546,6 +546,7 @@ void HandleLocallyKnownTree( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; @@ -758,6 +759,7 @@ void HandleKnownInOlderGenerationAfterTagging( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; @@ -1019,6 +1021,7 @@ auto CreateContentGitMap( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index 2d2ad107..4a7e9b51 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -173,6 +173,7 @@ auto CreateDistdirGitMap( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index d4a46486..37b0c543 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -350,6 +350,7 @@ auto CreateFilePathGitMap( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; diff --git a/src/other_tools/root_maps/tree_id_git_map.cpp b/src/other_tools/root_maps/tree_id_git_map.cpp index 3a33d11b..78c1cffd 100644 --- a/src/other_tools/root_maps/tree_id_git_map.cpp +++ b/src/other_tools/root_maps/tree_id_git_map.cpp @@ -235,6 +235,7 @@ auto CreateTreeIdGitMap( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; -- cgit v1.2.3