From 6242ef6fff52116398913a40634a71292616c126 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 21 Oct 2024 12:51:08 +0200 Subject: just-mr and SourceTree: Use new Git execution api instance In just-mr: to instantiate the new Git api instance, both storage configs, as well as the compatible storage, need to be passed to the maps. While there, use more explicit naming schemes for the storage and CAS instances used. In serve: also acquire gc locks for the local storages when needed to instantiate the new Git api, which now has access to the CAS. In all these instances we also pass, as needed, the local api, which currently still operates only in native mode. This makes no difference currently, but will ensure less changes needed when the future compatible-aware local api will be used instead. --- src/other_tools/just_mr/fetch.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/other_tools/just_mr/fetch.cpp') diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 04c6c013..bdca1331 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -491,18 +491,20 @@ auto MultiRepoFetch(std::shared_ptr const& config, &native_storage_config, common_args.jobs); - auto git_tree_fetch_map = - CreateGitTreeFetchMap(&critical_git_op_map, - &import_to_git_map, - common_args.git_path->string(), - *common_args.local_launcher, - serve ? &*serve : nullptr, - &native_storage_config, - &(*apis.local), - has_remote_api ? &*apis.remote : nullptr, - fetch_args.backup_to_remote, - &progress, - common_args.jobs); + auto git_tree_fetch_map = CreateGitTreeFetchMap( + &critical_git_op_map, + &import_to_git_map, + common_args.git_path->string(), + *common_args.local_launcher, + serve ? &*serve : nullptr, + &native_storage_config, + compat_storage_config != nullptr ? &*compat_storage_config : nullptr, + compat_storage != nullptr ? &*compat_storage : nullptr, + &(*apis.local), + has_remote_api ? &*apis.remote : nullptr, + fetch_args.backup_to_remote, + &progress, + common_args.jobs); // set up progress observer std::atomic done{false}; -- cgit v1.2.3