From d6eb885a3f205e00a3be9f2ae2e8f510cae15d8a Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Wed, 22 Mar 2023 14:23:24 +0100 Subject: just-mr: Add git binary option In the rare cases that we need to shell out to git, let the user configure what binary to use. Option resolves in the same way as the just executable, including allowing it to be set via just-mrrc. Updates all cases of shelling out to git (fetch and commit update). Update just-mr and just-mrrc docs accordingly. --- src/other_tools/ops_maps/git_update_map.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 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 d399ff40..cc40aef6 100644 --- a/src/other_tools/ops_maps/git_update_map.cpp +++ b/src/other_tools/ops_maps/git_update_map.cpp @@ -22,13 +22,14 @@ #include "src/utils/cpp/tmp_dir.hpp" auto CreateGitUpdateMap(GitCASPtr const& git_cas, + std::string const& git_bin, 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) { + auto update_commits = [git_cas, git_bin, 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) { @@ -59,6 +60,7 @@ auto CreateGitUpdateMap(GitCASPtr const& git_cas, auto new_commit = git_repo->UpdateCommitViaTmpRepo(tmp_dir->GetPath(), key.first, key.second, + git_bin, launcher, wrapped_logger); JustMRProgress::Instance().TaskTracker().Stop(id); -- cgit v1.2.3