diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-08-19 16:01:16 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-08-26 12:12:00 +0200 |
commit | c889b852a652115f4a6936a96ebdee9410571997 (patch) | |
tree | e553f21acab38fc4466adda19a378952df6a7eb6 /src/other_tools/ops_maps | |
parent | a312e71b59340f7b6d8dc5aac9202137ae81d02b (diff) | |
download | justbuild-c889b852a652115f4a6936a96ebdee9410571997.tar.gz |
GitOps: Pass source directory to GitInitialCommit operation
While there, ensure optional Git operation parameters are checked
before use for the operations that require them.
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.cpp | 1 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_tree_fetch_map.cpp | 2 | ||||
-rw-r--r-- | src/other_tools/ops_maps/import_to_git_map.cpp | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp index 0c6ccd25..95518326 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -138,6 +138,7 @@ auto CreateContentCASMap( 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/ops_maps/git_tree_fetch_map.cpp b/src/other_tools/ops_maps/git_tree_fetch_map.cpp index cceda079..7a4d9e0a 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp @@ -272,6 +272,7 @@ auto CreateGitTreeFetchMap( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; @@ -457,6 +458,7 @@ auto CreateGitTreeFetchMap( "", // git_hash fmt::format("Content of tree {}", key.hash), // message + tmp_dir->GetPath() // source_path }, .op_type = GitOpType::INITIAL_COMMIT}; critical_git_op_map->ConsumeAfterKeysReady( diff --git a/src/other_tools/ops_maps/import_to_git_map.cpp b/src/other_tools/ops_maps/import_to_git_map.cpp index 7e9331b0..e883e0dd 100644 --- a/src/other_tools/ops_maps/import_to_git_map.cpp +++ b/src/other_tools/ops_maps/import_to_git_map.cpp @@ -109,6 +109,7 @@ auto CreateImportToGitMap( fmt::format("Content of {} {}", key.repo_type, key.content), // message + key.target_path // source_path }, .op_type = GitOpType::INITIAL_COMMIT}; critical_git_op_map->ConsumeAfterKeysReady( @@ -137,6 +138,7 @@ auto CreateImportToGitMap( storage_config->GitRoot(), // target_path "", // git_hash std::nullopt, // message + std::nullopt, // source_path true // init_bare }, .op_type = GitOpType::ENSURE_INIT}; |