summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps/git_update_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/ops_maps/git_update_map.cpp')
-rw-r--r--src/other_tools/ops_maps/git_update_map.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/other_tools/ops_maps/git_update_map.cpp b/src/other_tools/ops_maps/git_update_map.cpp
index 143000bc..de3bfb25 100644
--- a/src/other_tools/ops_maps/git_update_map.cpp
+++ b/src/other_tools/ops_maps/git_update_map.cpp
@@ -16,20 +16,22 @@
#include "fmt/core.h"
#include "src/buildtool/execution_api/local/config.hpp"
-#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/fs_utils.hpp"
#include "src/other_tools/just_mr/progress_reporting/progress.hpp"
#include "src/other_tools/just_mr/progress_reporting/statistics.hpp"
-auto CreateGitUpdateMap(GitCASPtr const& git_cas,
- std::string const& git_bin,
- std::vector<std::string> const& launcher,
- std::size_t jobs) -> GitUpdateMap {
- auto update_commits = [git_cas, git_bin, launcher](auto /* unused */,
- auto setter,
- auto logger,
- auto /* unused */,
- auto const& key) {
+auto CreateGitUpdateMap(
+ GitCASPtr const& git_cas,
+ std::string const& git_bin,
+ std::vector<std::string> const& launcher,
+ gsl::not_null<StorageConfig const*> const& storage_config,
+ std::size_t jobs) -> GitUpdateMap {
+ auto update_commits = [git_cas, git_bin, launcher, storage_config](
+ auto /* unused */,
+ auto setter,
+ auto logger,
+ auto /* unused */,
+ auto const& key) {
// perform git update commit
auto git_repo = GitRepoRemote::Open(git_cas); // wrap the tmp odb
if (not git_repo) {
@@ -49,14 +51,13 @@ auto CreateGitUpdateMap(GitCASPtr const& git_cas,
// update commit
auto id = fmt::format("{}:{}", key.repo, key.branch);
JustMRProgress::Instance().TaskTracker().Start(id);
- auto new_commit =
- git_repo->UpdateCommitViaTmpRepo(StorageConfig::Instance(),
- key.repo,
- key.branch,
- key.inherit_env,
- git_bin,
- launcher,
- wrapped_logger);
+ auto new_commit = git_repo->UpdateCommitViaTmpRepo(*storage_config,
+ key.repo,
+ key.branch,
+ key.inherit_env,
+ git_bin,
+ launcher,
+ wrapped_logger);
JustMRProgress::Instance().TaskTracker().Stop(id);
if (not new_commit) {
return;