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/just_mr/cli.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/other_tools/just_mr/cli.hpp') diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp index 72e6f8a4..4e363460 100644 --- a/src/other_tools/just_mr/cli.hpp +++ b/src/other_tools/just_mr/cli.hpp @@ -41,6 +41,7 @@ struct MultiRepoCommonArguments { std::optional just_path{std::nullopt}; std::optional main{std::nullopt}; std::optional rc_path{std::nullopt}; + std::optional git_path{std::nullopt}; bool norc{false}; std::size_t jobs{std::max(1U, std::thread::hardware_concurrency())}; }; @@ -148,6 +149,10 @@ static inline void SetupMultiRepoCommonArguments( }, "Use just-mrrc file from custom path.") ->type_name("RCFILE"); + app->add_option("--git", + clargs->git_path, + "Path to the git binary. (Default: \"git\")") + ->type_name("PATH"); app->add_flag("--norc", clargs->norc, "Do not use any just-mrrc file."); app->add_option("-j, --jobs", clargs->jobs, -- cgit v1.2.3