summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps/git_update_map.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-22 14:23:24 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-23 09:50:43 +0100
commitd6eb885a3f205e00a3be9f2ae2e8f510cae15d8a (patch)
treedabb8e10973ae1d5f21f4c01bda72b3d1b68402d /src/other_tools/ops_maps/git_update_map.cpp
parente0c38d7083e6c972a432bfff3a9863f251f2170c (diff)
downloadjustbuild-d6eb885a3f205e00a3be9f2ae2e8f510cae15d8a.tar.gz
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.
Diffstat (limited to 'src/other_tools/ops_maps/git_update_map.cpp')
-rw-r--r--src/other_tools/ops_maps/git_update_map.cpp12
1 files changed, 7 insertions, 5 deletions
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<std::string> 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);