diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-24 12:20:32 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-25 13:59:48 +0200 |
commit | dbac8a19685b83dd1d656201da900a20e11428f2 (patch) | |
tree | 311ecff8b9498f3753d2df83b95d7301f11d90d8 /src/other_tools/root_maps/content_git_map.cpp | |
parent | f77492425703122c9b977ba3e0f9f5fdd80a08d1 (diff) | |
download | justbuild-dbac8a19685b83dd1d656201da900a20e11428f2.tar.gz |
Introduce a type allias for an optional ptr to IExecutionApi
...and replace verbose constructions.
Diffstat (limited to 'src/other_tools/root_maps/content_git_map.cpp')
-rw-r--r-- | src/other_tools/root_maps/content_git_map.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp index 4052b963..440593d0 100644 --- a/src/other_tools/root_maps/content_git_map.cpp +++ b/src/other_tools/root_maps/content_git_map.cpp @@ -52,14 +52,13 @@ namespace { /// root if it was marked absent. /// It guarantees the logger is called exactly once with fatal on failure, and /// the setter on success. -void EnsureRootAsAbsent( - std::string const& tree_id, - ArchiveRepoInfo const& key, - std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, - bool is_cache_hit, - ContentGitMap::SetterPtr const& ws_setter, - ContentGitMap::LoggerPtr const& logger) { +void EnsureRootAsAbsent(std::string const& tree_id, + ArchiveRepoInfo const& key, + std::optional<ServeApi> const& serve, + IExecutionApi::OptionalPtr const& remote_api, + bool is_cache_hit, + ContentGitMap::SetterPtr const& ws_setter, + ContentGitMap::LoggerPtr const& logger) { // this is an absent root if (serve) { // check if the serve endpoint has this root @@ -176,7 +175,7 @@ void ResolveContentTree( bool is_cache_hit, bool is_absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, + IExecutionApi::OptionalPtr const& remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<TaskSystem*> const& ts, @@ -365,7 +364,7 @@ void WriteIdFileAndSetWSRoot( std::filesystem::path const& archive_tree_id_file, bool is_absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, + IExecutionApi::OptionalPtr const& remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<TaskSystem*> const& ts, @@ -426,7 +425,7 @@ void ExtractAndImportToGit( std::filesystem::path const& archive_tree_id_file, bool is_absent, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, + IExecutionApi::OptionalPtr const& remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, @@ -510,7 +509,7 @@ auto CreateContentGitMap( gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, std::optional<ServeApi> const& serve, - std::optional<gsl::not_null<IExecutionApi const*>> const& remote_api, + IExecutionApi::OptionalPtr const& remote_api, bool fetch_absent, std::size_t jobs) -> ContentGitMap { auto gitify_content = [content_cas_map, |