diff options
Diffstat (limited to 'src/other_tools')
18 files changed, 71 insertions, 71 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index ab6e593b..d0018ba4 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -444,7 +444,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, common_args.alternative_mirrors, common_args.ca_info, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); @@ -468,7 +468,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, &import_to_git_map, common_args.git_path->string(), *common_args.local_launcher, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, fetch_args.backup_to_remote, diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp index a383734a..dacbfec6 100644 --- a/src/other_tools/just_mr/setup.cpp +++ b/src/other_tools/just_mr/setup.cpp @@ -164,7 +164,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, common_args.alternative_mirrors, common_args.ca_info, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); @@ -180,7 +180,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, &import_to_git_map, common_args.git_path->string(), *common_args.local_launcher, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, false, /* backup_to_remote */ @@ -195,7 +195,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, common_args.alternative_mirrors, common_args.git_path->string(), *common_args.local_launcher, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.fetch_absent, @@ -209,7 +209,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, common_args.ca_info, &resolve_symlinks_map, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, has_remote_api ? &*apis.remote : nullptr, common_args.fetch_absent, common_args.jobs); @@ -217,7 +217,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, auto foreign_file_git_map = CreateForeignFileGitMap(&content_cas_map, &import_to_git_map, - serve, + serve ? &*serve : nullptr, common_args.fetch_absent, common_args.jobs); @@ -226,7 +226,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, &critical_git_op_map, &import_to_git_map, &resolve_symlinks_map, - serve, + serve ? &*serve : nullptr, has_remote_api ? &*apis.remote : nullptr, common_args.jobs, multi_repo_tool_name, @@ -237,7 +237,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, CreateDistdirGitMap(&content_cas_map, &import_to_git_map, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); @@ -247,7 +247,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, &critical_git_op_map, &import_to_git_map, common_args.fetch_absent, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp index 4e526bc7..651e83fb 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -108,7 +108,7 @@ auto CreateContentCASMap( MirrorsPtr const& additional_mirrors, CAInfoPtr const& ca_info, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> ContentCASMap { @@ -116,7 +116,7 @@ auto CreateContentCASMap( additional_mirrors, ca_info, critical_git_op_map, - &serve, + serve, local_api, remote_api](auto ts, auto setter, @@ -149,7 +149,7 @@ auto CreateContentCASMap( just_mr_paths, additional_mirrors, ca_info, - &serve, + serve, local_api, remote_api, setter, @@ -215,7 +215,7 @@ auto CreateContentCASMap( return; } // check if content is known to remote serve service - if (serve and remote_api != nullptr and + if (serve != nullptr and remote_api != nullptr and serve->ContentInRemoteCAS(key.content)) { // try to get content from remote CAS if (remote_api->RetrieveToCas( diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp index f0d0369b..049edc5f 100644 --- a/src/other_tools/ops_maps/content_cas_map.hpp +++ b/src/other_tools/ops_maps/content_cas_map.hpp @@ -84,7 +84,7 @@ using ContentCASMap = AsyncMapConsumer<ArchiveContent, std::nullptr_t>; MirrorsPtr const& additional_mirrors, CAInfoPtr const& ca_info, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> ContentCASMap; 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 50433b20..d56c79c7 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp @@ -128,7 +128,7 @@ auto CreateGitTreeFetchMap( gsl::not_null<ImportToGitMap*> const& import_to_git_map, std::string const& git_bin, std::vector<std::string> const& launcher, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, bool backup_to_remote, @@ -137,7 +137,7 @@ auto CreateGitTreeFetchMap( import_to_git_map, git_bin, launcher, - &serve, + serve, local_api, remote_api, backup_to_remote](auto ts, @@ -163,7 +163,7 @@ auto CreateGitTreeFetchMap( import_to_git_map, git_bin, launcher, - &serve, + serve, local_api, remote_api, backup_to_remote, @@ -231,7 +231,7 @@ auto CreateGitTreeFetchMap( JustMRProgress::Instance().TaskTracker().Start(key.origin); // check if tree is known to remote serve service and can be // made available in remote CAS - if (serve and remote_api != nullptr) { + if (serve != nullptr and remote_api != nullptr) { // as we anyway interrogate the remote execution endpoint, // we're only interested here in the serve endpoint making // an attempt to upload the tree, if known, to remote CAS diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.hpp b/src/other_tools/ops_maps/git_tree_fetch_map.hpp index 342629ab..4a8ab527 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.hpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.hpp @@ -60,7 +60,7 @@ using GitTreeFetchMap = AsyncMapConsumer<GitTreeInfo, bool>; gsl::not_null<ImportToGitMap*> const& import_to_git_map, std::string const& git_bin, std::vector<std::string> const& launcher, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, bool backup_to_remote, diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp index 65585afc..22f85f35 100644 --- a/src/other_tools/root_maps/commit_git_map.cpp +++ b/src/other_tools/root_maps/commit_git_map.cpp @@ -61,12 +61,12 @@ namespace { void EnsureRootAsAbsent(std::string const& tree_id, std::filesystem::path const& repo_root, GitRepoInfo const& repo_info, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, CommitGitMap::SetterPtr const& ws_setter, CommitGitMap::LoggerPtr const& logger) { // this is an absent root - if (serve) { + if (serve != nullptr) { // check if the serve endpoint has this root auto has_tree = CheckServeHasAbsentRoot(*serve, tree_id, logger); if (not has_tree) { @@ -409,7 +409,7 @@ void EnsureCommit(GitRepoInfo const& repo_info, gsl::not_null<ImportToGitMap*> const& import_to_git_map, std::string const& git_bin, std::vector<std::string> const& launcher, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, bool fetch_absent, @@ -508,7 +508,7 @@ void EnsureCommit(GitRepoInfo const& repo_info, // no id file association exists JustMRProgress::Instance().TaskTracker().Start(repo_info.origin); // check if commit is known to remote serve service - if (serve) { + if (serve != nullptr) { // if root purely absent, request only the subdir tree if (repo_info.absent and not fetch_absent) { auto serve_result = @@ -921,7 +921,7 @@ auto CreateCommitGitMap( MirrorsPtr const& additional_mirrors, std::string const& git_bin, std::vector<std::string> const& launcher, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, bool fetch_absent, @@ -932,7 +932,7 @@ auto CreateCommitGitMap( additional_mirrors, git_bin, launcher, - &serve, + serve, local_api, remote_api, fetch_absent](auto ts, @@ -973,7 +973,7 @@ auto CreateCommitGitMap( import_to_git_map, git_bin, launcher, - &serve, + serve, local_api, remote_api, fetch_absent, diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp index 14766018..78c67800 100644 --- a/src/other_tools/root_maps/commit_git_map.hpp +++ b/src/other_tools/root_maps/commit_git_map.hpp @@ -81,7 +81,7 @@ using CommitGitMap = MirrorsPtr const& additional_mirrors, std::string const& git_bin, std::vector<std::string> const& launcher, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, bool fetch_absent, diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp index a6d0fa15..eb4177d3 100644 --- a/src/other_tools/root_maps/content_git_map.cpp +++ b/src/other_tools/root_maps/content_git_map.cpp @@ -54,13 +54,13 @@ namespace { /// the setter on success. void EnsureRootAsAbsent(std::string const& tree_id, ArchiveRepoInfo const& key, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, bool is_cache_hit, ContentGitMap::SetterPtr const& ws_setter, ContentGitMap::LoggerPtr const& logger) { // this is an absent root - if (serve) { + if (serve != nullptr) { // check if the serve endpoint has this root auto has_tree = CheckServeHasAbsentRoot(*serve, tree_id, logger); if (not has_tree) { @@ -174,7 +174,7 @@ void ResolveContentTree( GitCASPtr const& just_git_cas, bool is_cache_hit, bool is_absent, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, @@ -230,7 +230,7 @@ void ResolveContentTree( is_cache_hit, key, is_absent, - &serve, + serve, remote_api, ts, ws_setter, @@ -272,7 +272,7 @@ void ResolveContentTree( key, tree_id_file, is_absent, - &serve, + serve, remote_api, is_cache_hit, ws_setter, @@ -363,7 +363,7 @@ void WriteIdFileAndSetWSRoot( GitCASPtr const& just_git_cas, std::filesystem::path const& archive_tree_id_file, bool is_absent, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, @@ -424,7 +424,7 @@ void ExtractAndImportToGit( std::filesystem::path const& content_cas_path, std::filesystem::path const& archive_tree_id_file, bool is_absent, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, @@ -460,7 +460,7 @@ void ExtractAndImportToGit( archive_tree_id_file, key, is_absent, - &serve, + serve, remote_api, critical_git_op_map, resolve_symlinks_map, @@ -508,7 +508,7 @@ auto CreateContentGitMap( CAInfoPtr const& ca_info, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, bool fetch_absent, std::size_t jobs) -> ContentGitMap { @@ -519,7 +519,7 @@ auto CreateContentGitMap( just_mr_paths, additional_mirrors, ca_info, - &serve, + serve, remote_api, fetch_absent](auto ts, auto setter, @@ -555,7 +555,7 @@ auto CreateContentGitMap( [archive_tree_id = *archive_tree_id, key, fetch_absent, - &serve, + serve, remote_api, critical_git_op_map, resolve_symlinks_map, @@ -622,7 +622,7 @@ auto CreateContentGitMap( if (key.absent and not fetch_absent) { // request the resolved subdir tree from the serve endpoint, if // given - if (serve) { + if (serve != nullptr) { auto serve_result = serve->RetrieveTreeFromArchive(key.archive.content, key.repo_type, @@ -701,7 +701,7 @@ auto CreateContentGitMap( just_mr_paths, additional_mirrors, ca_info, - &serve, + serve, remote_api, ts, setter, @@ -847,7 +847,7 @@ auto CreateContentGitMap( content_cas_path, archive_tree_id_file, /*is_absent=*/false, - /*serve=*/std::nullopt, + /*serve=*/nullptr, /*remote_api=*/nullptr, critical_git_op_map, import_to_git_map, diff --git a/src/other_tools/root_maps/content_git_map.hpp b/src/other_tools/root_maps/content_git_map.hpp index 4a20f98b..959edaa9 100644 --- a/src/other_tools/root_maps/content_git_map.hpp +++ b/src/other_tools/root_maps/content_git_map.hpp @@ -43,7 +43,7 @@ using ContentGitMap = CAInfoPtr const& ca_info, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, bool fetch_absent, std::size_t jobs) -> ContentGitMap; diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index bc9838eb..46a2b9bf 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -132,14 +132,14 @@ auto CreateDistdirGitMap( gsl::not_null<ContentCASMap*> const& content_cas_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> DistdirGitMap { auto distdir_to_git = [content_cas_map, import_to_git_map, critical_git_op_map, - &serve, + serve, local_api, remote_api](auto ts, auto setter, @@ -175,7 +175,7 @@ auto CreateDistdirGitMap( [distdir_tree_id = *distdir_tree_id, content_id = key.content_id, key, - &serve, + serve, remote_api, setter, logger](auto const& values) { @@ -189,7 +189,7 @@ auto CreateDistdirGitMap( // subdir is "." here, so no need to deal with the Git cache // and we can simply set the workspace root if (key.absent) { - if (serve) { + if (serve != nullptr) { // check if serve endpoint has this root auto has_tree = CheckServeHasAbsentRoot( *serve, distdir_tree_id, logger); @@ -331,7 +331,7 @@ auto CreateDistdirGitMap( // up the absent root without actually checking the local status of // each content blob individually if (key.absent) { - if (serve) { + if (serve != nullptr) { // first check if serve endpoint has tree auto has_tree = CheckServeHasAbsentRoot(*serve, tree_id, logger); @@ -483,7 +483,7 @@ auto CreateDistdirGitMap( } // now ask serve endpoint if it can set up the root; as this is for // a present root, a corresponding remote endpoint is needed - if (serve and remote_api != nullptr) { + if (serve != nullptr and remote_api != nullptr) { auto serve_result = serve->RetrieveTreeFromDistdir(key.content_list, /*sync_tree=*/true); diff --git a/src/other_tools/root_maps/distdir_git_map.hpp b/src/other_tools/root_maps/distdir_git_map.hpp index 77717344..c83b9512 100644 --- a/src/other_tools/root_maps/distdir_git_map.hpp +++ b/src/other_tools/root_maps/distdir_git_map.hpp @@ -54,7 +54,7 @@ using DistdirGitMap = gsl::not_null<ContentCASMap*> const& content_cas_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> DistdirGitMap; diff --git a/src/other_tools/root_maps/foreign_file_git_map.cpp b/src/other_tools/root_maps/foreign_file_git_map.cpp index 9a69ef8e..809c34fc 100644 --- a/src/other_tools/root_maps/foreign_file_git_map.cpp +++ b/src/other_tools/root_maps/foreign_file_git_map.cpp @@ -113,7 +113,7 @@ void UseCacheHit(const std::string& tree_id, } void HandleAbsentForeignFile(ForeignFileInfo const& key, - std::optional<ServeApi> const& serve, + ServeApi const* serve, ForeignFileGitMap::SetterPtr const& setter, ForeignFileGitMap::LoggerPtr const& logger) { // Compute tree in memory @@ -137,7 +137,7 @@ void HandleAbsentForeignFile(ForeignFileInfo const& key, return; } auto tree_id = ToHexString(tree->first); - if (serve) { + if (serve != nullptr) { auto has_tree = CheckServeHasAbsentRoot(*serve, tree_id, logger); if (not has_tree) { return; @@ -195,11 +195,11 @@ void HandleAbsentForeignFile(ForeignFileInfo const& key, [[nodiscard]] auto CreateForeignFileGitMap( gsl::not_null<ContentCASMap*> const& content_cas_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, bool fetch_absent, std::size_t jobs) -> ForeignFileGitMap { auto setup_foreign_file = - [content_cas_map, import_to_git_map, fetch_absent, &serve]( + [content_cas_map, import_to_git_map, fetch_absent, serve]( auto ts, auto setter, auto logger, diff --git a/src/other_tools/root_maps/foreign_file_git_map.hpp b/src/other_tools/root_maps/foreign_file_git_map.hpp index 2cf34df1..941d28f7 100644 --- a/src/other_tools/root_maps/foreign_file_git_map.hpp +++ b/src/other_tools/root_maps/foreign_file_git_map.hpp @@ -34,7 +34,7 @@ using ForeignFileGitMap = [[nodiscard]] auto CreateForeignFileGitMap( gsl::not_null<ContentCASMap*> const& content_cas_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, bool fetch_absent, std::size_t jobs) -> ForeignFileGitMap; diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index 2c918133..3f47d237 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -36,14 +36,14 @@ namespace { void CheckServeAndSetRoot(std::string const& tree_id, std::string const& repo_root, bool absent, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, FilePathGitMap::SetterPtr const& ws_setter, FilePathGitMap::LoggerPtr const& logger) { // if serve endpoint is given, try to ensure it has this tree available to // be able to build against it. If root is not absent, do not fail if we // don't have a suitable remote endpoint, but warn user nonetheless. - if (serve) { + if (serve != nullptr) { auto has_tree = CheckServeHasAbsentRoot(*serve, tree_id, logger); if (not has_tree) { return; // fatal @@ -100,7 +100,7 @@ void ResolveFilePathTree( bool absent, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, gsl::not_null<TaskSystem*> const& ts, FilePathGitMap::SetterPtr const& ws_setter, @@ -145,7 +145,7 @@ void ResolveFilePathTree( tree_hash, tree_id_file, absent, - &serve, + serve, remote_api, ts, ws_setter, @@ -186,7 +186,7 @@ void ResolveFilePathTree( [resolved_tree_id, tree_id_file, absent, - &serve, + serve, remote_api, ws_setter, logger](auto const& values) { @@ -254,7 +254,7 @@ auto CreateFilePathGitMap( 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, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, std::size_t jobs, std::string multi_repo_tool_name, @@ -263,7 +263,7 @@ auto CreateFilePathGitMap( critical_git_op_map, import_to_git_map, resolve_symlinks_map, - &serve, + serve, remote_api, multi_repo_tool_name, build_tool_name](auto ts, @@ -302,7 +302,7 @@ auto CreateFilePathGitMap( repo_root = std::move(*repo_root), critical_git_op_map, resolve_symlinks_map, - &serve, + serve, remote_api, ts, setter, @@ -362,7 +362,7 @@ auto CreateFilePathGitMap( absent, critical_git_op_map, resolve_symlinks_map, - &serve, + serve, remote_api, ts, setter, @@ -451,7 +451,7 @@ auto CreateFilePathGitMap( absent = key.absent, critical_git_op_map, resolve_symlinks_map, - &serve, + serve, remote_api, ts, setter, diff --git a/src/other_tools/root_maps/fpath_git_map.hpp b/src/other_tools/root_maps/fpath_git_map.hpp index 49550249..772cdc74 100644 --- a/src/other_tools/root_maps/fpath_git_map.hpp +++ b/src/other_tools/root_maps/fpath_git_map.hpp @@ -54,7 +54,7 @@ using FilePathGitMap = AsyncMapConsumer<FpathInfo, nlohmann::json>; 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, - std::optional<ServeApi> const& serve, + ServeApi const* serve, IExecutionApi const* remote_api, std::size_t jobs, std::string multi_repo_tool_name, 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 ecbda9c0..b6bf3a22 100644 --- a/src/other_tools/root_maps/tree_id_git_map.cpp +++ b/src/other_tools/root_maps/tree_id_git_map.cpp @@ -147,7 +147,7 @@ auto CreateTreeIdGitMap( gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, bool fetch_absent, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> TreeIdGitMap { @@ -155,7 +155,7 @@ auto CreateTreeIdGitMap( critical_git_op_map, import_to_git_map, fetch_absent, - &serve, + serve, local_api, remote_api](auto ts, auto setter, @@ -167,7 +167,7 @@ auto CreateTreeIdGitMap( // found on the serve endpoint or it can be made available to it; // otherwise, error out if (key.absent and not fetch_absent) { - if (serve) { + if (serve != nullptr) { // check serve endpoint auto has_tree = CheckServeHasAbsentRoot(*serve, key.tree_info.hash, logger); @@ -238,7 +238,7 @@ auto CreateTreeIdGitMap( critical_git_op_map->ConsumeAfterKeysReady( ts, {std::move(op_key)}, - [&serve, + [serve, digest, import_to_git_map, local_api, diff --git a/src/other_tools/root_maps/tree_id_git_map.hpp b/src/other_tools/root_maps/tree_id_git_map.hpp index d1a28351..d2de005f 100644 --- a/src/other_tools/root_maps/tree_id_git_map.hpp +++ b/src/other_tools/root_maps/tree_id_git_map.hpp @@ -69,7 +69,7 @@ using TreeIdGitMap = gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ImportToGitMap*> const& import_to_git_map, bool fetch_absent, - std::optional<ServeApi> const& serve, + ServeApi const* serve, gsl::not_null<IExecutionApi const*> const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> TreeIdGitMap; |