summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-10 15:22:14 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-06-18 12:05:10 +0200
commit7576e201023f76b017eae1820461bdab094bd290 (patch)
tree3acac800e4885ccefc09dc56090eaee0e841548a /src/other_tools/root_maps/commit_git_map.cpp
parent3820b5b848644d467013ef0a95c21d08a304b7d3 (diff)
downloadjustbuild-7576e201023f76b017eae1820461bdab094bd290.tar.gz
Use ServeApi functionality via Instance()
...to track changes during refactoring easier.
Diffstat (limited to 'src/other_tools/root_maps/commit_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/commit_git_map.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp
index 913a7e15..b6dac07a 100644
--- a/src/other_tools/root_maps/commit_git_map.cpp
+++ b/src/other_tools/root_maps/commit_git_map.cpp
@@ -77,10 +77,10 @@ void EnsureRootAsAbsent(
if (not *has_tree) {
// try to see if serve endpoint has the information to prepare the
// root itself
- auto serve_result =
- ServeApi::RetrieveTreeFromCommit(repo_info.hash,
- repo_info.subdir,
- /*sync_tree = */ false);
+ auto serve_result = ServeApi::Instance().RetrieveTreeFromCommit(
+ repo_info.hash,
+ repo_info.subdir,
+ /*sync_tree = */ false);
if (std::holds_alternative<std::string>(serve_result)) {
// if serve has set up the tree, it must match what we expect
auto const& served_tree_id =
@@ -513,10 +513,10 @@ void EnsureCommit(
if (serve_api_exists) {
// if root purely absent, request only the subdir tree
if (repo_info.absent and not fetch_absent) {
- auto serve_result =
- ServeApi::RetrieveTreeFromCommit(repo_info.hash,
- repo_info.subdir,
- /*sync_tree = */ false);
+ auto serve_result = ServeApi::Instance().RetrieveTreeFromCommit(
+ repo_info.hash,
+ repo_info.subdir,
+ /*sync_tree = */ false);
if (std::holds_alternative<std::string>(serve_result)) {
// set the workspace root as absent
JustMRProgress::Instance().TaskTracker().Stop(
@@ -544,10 +544,10 @@ void EnsureCommit(
// otherwise, request (and sync) the whole commit tree, to ensure
// we maintain the id file association
else {
- auto serve_result =
- ServeApi::RetrieveTreeFromCommit(repo_info.hash,
- /*subdir = */ ".",
- /*sync_tree = */ true);
+ auto serve_result = ServeApi::Instance().RetrieveTreeFromCommit(
+ repo_info.hash,
+ /*subdir = */ ".",
+ /*sync_tree = */ true);
if (std::holds_alternative<std::string>(serve_result)) {
auto const& root_tree_id =
std::get<std::string>(serve_result);