summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-26 16:07:58 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 12:58:35 +0200
commit5bc6265b2ffe43370b4cddd0a9e4c09b059ef131 (patch)
tree63619c3d43f97c4ffa16feb9094fc8631620b164 /src/other_tools/ops_maps
parent3440784e94de51c95d3dcca8509f8e46b4722ee6 (diff)
downloadjustbuild-5bc6265b2ffe43370b4cddd0a9e4c09b059ef131.tar.gz
Pass StorageConfig to git_repo and git_repo_remote
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r--src/other_tools/ops_maps/TARGETS1
-rw-r--r--src/other_tools/ops_maps/git_tree_fetch_map.cpp1
-rw-r--r--src/other_tools/ops_maps/git_update_map.cpp15
-rw-r--r--src/other_tools/ops_maps/import_to_git_map.cpp1
4 files changed, 12 insertions, 6 deletions
diff --git a/src/other_tools/ops_maps/TARGETS b/src/other_tools/ops_maps/TARGETS
index 01152ed9..ab8c6664 100644
--- a/src/other_tools/ops_maps/TARGETS
+++ b/src/other_tools/ops_maps/TARGETS
@@ -50,6 +50,7 @@
, ["src/buildtool/storage", "fs_utils"]
, ["src/other_tools/just_mr/progress_reporting", "statistics"]
, ["src/other_tools/just_mr/progress_reporting", "progress"]
+ , ["src/buildtool/storage", "config"]
]
}
, "content_cas_map":
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 0e84689a..60ea67da 100644
--- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp
+++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp
@@ -423,6 +423,7 @@ auto CreateGitTreeFetchMap(
fatal);
});
if (not just_git_repo->FetchViaTmpRepo(
+ StorageConfig::Instance(),
target_path.string(),
std::nullopt,
key.inherit_env,
diff --git a/src/other_tools/ops_maps/git_update_map.cpp b/src/other_tools/ops_maps/git_update_map.cpp
index 9886b84b..143000bc 100644
--- a/src/other_tools/ops_maps/git_update_map.cpp
+++ b/src/other_tools/ops_maps/git_update_map.cpp
@@ -16,6 +16,7 @@
#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"
@@ -48,12 +49,14 @@ 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(key.repo,
- key.branch,
- key.inherit_env,
- git_bin,
- launcher,
- wrapped_logger);
+ auto new_commit =
+ git_repo->UpdateCommitViaTmpRepo(StorageConfig::Instance(),
+ key.repo,
+ key.branch,
+ key.inherit_env,
+ git_bin,
+ launcher,
+ wrapped_logger);
JustMRProgress::Instance().TaskTracker().Stop(id);
if (not new_commit) {
return;
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 6a998f9d..7e75ab71 100644
--- a/src/other_tools/ops_maps/import_to_git_map.cpp
+++ b/src/other_tools/ops_maps/import_to_git_map.cpp
@@ -181,6 +181,7 @@ auto CreateImportToGitMap(
fatal);
});
if (not just_git_repo->FetchViaTmpRepo(
+ StorageConfig::Instance(),
target_path.string(),
std::nullopt,
std::vector<std::string>{} /* inherit_env */,