From 12d0c288ea23e1bd7e0401223ba413bca3d94869 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 21 Mar 2023 14:58:54 +0100 Subject: just-mr: Shell out to system Git for update commit from SSH remote... ...due to limitations in SSH support in libgit2. In this case, we simply execute 'git ls-remote []' and then parse the output. Remote interogation requires no local repository, so it is an asynchronious operation by default. --- src/other_tools/ops_maps/git_update_map.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/other_tools/ops_maps/git_update_map.cpp') diff --git a/src/other_tools/ops_maps/git_update_map.cpp b/src/other_tools/ops_maps/git_update_map.cpp index c4305e69..f096d3a9 100644 --- a/src/other_tools/ops_maps/git_update_map.cpp +++ b/src/other_tools/ops_maps/git_update_map.cpp @@ -21,13 +21,14 @@ #include "src/other_tools/just_mr/utils.hpp" #include "src/utils/cpp/tmp_dir.hpp" -auto CreateGitUpdateMap(GitCASPtr const& git_cas, std::size_t jobs) - -> GitUpdateMap { - auto update_commits = [git_cas](auto /* unused */, - auto setter, - auto logger, - auto /* unused */, - auto const& key) { +auto CreateGitUpdateMap(GitCASPtr const& git_cas, + std::vector const& launcher, + std::size_t jobs) -> GitUpdateMap { + auto update_commits = [git_cas, launcher](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) { @@ -55,8 +56,11 @@ auto CreateGitUpdateMap(GitCASPtr const& git_cas, std::size_t jobs) // update commit auto id = fmt::format("{}:{}", key.first, key.second); JustMRProgress::Instance().TaskTracker().Start(id); - auto new_commit = git_repo->UpdateCommitViaTmpRepo( - tmp_dir->GetPath(), key.first, key.second, wrapped_logger); + auto new_commit = git_repo->UpdateCommitViaTmpRepo(tmp_dir->GetPath(), + key.first, + key.second, + launcher, + wrapped_logger); JustMRProgress::Instance().TaskTracker().Stop(id); if (not new_commit) { return; -- cgit v1.2.3