summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/just_mr/main.cpp')
-rw-r--r--src/other_tools/just_mr/main.cpp38
1 files changed, 28 insertions, 10 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp
index 9f2a47ce..290d6bcf 100644
--- a/src/other_tools/just_mr/main.cpp
+++ b/src/other_tools/just_mr/main.cpp
@@ -379,6 +379,14 @@ void SetupLogging(MultiRepoLogArguments const& clargs) {
clargs->common.just_path = just->first;
}
}
+ // read git binary path; overwritten if user provided it already
+ if (not clargs->common.git_path) {
+ auto git = ReadLocation(rc_config["git"],
+ clargs->common.just_mr_paths->workspace_root);
+ if (git) {
+ clargs->common.git_path = git->first;
+ }
+ }
// read additional just args; user can append, but does not overwrite
auto just_args = rc_config["just args"];
if (just_args.IsNotNull()) {
@@ -1007,9 +1015,11 @@ void DefaultReachableRepositories(
// Initialize resulting config to be updated
auto mr_config = config->ToJson();
// Create async map
- auto git_update_map = CreateGitUpdateMap(git_repo->GetGitCAS(),
- *arguments.common.local_launcher,
- arguments.common.jobs);
+ auto git_update_map =
+ CreateGitUpdateMap(git_repo->GetGitCAS(),
+ arguments.common.git_path->string(),
+ *arguments.common.local_launcher,
+ arguments.common.jobs);
// set up progress observer
JustMRProgress::Instance().SetTotal(repos_to_update.size());
@@ -1118,13 +1128,16 @@ void DefaultReachableRepositories(
arguments.common.jobs);
auto import_to_git_map =
CreateImportToGitMap(&critical_git_op_map,
+ arguments.common.git_path->string(),
*arguments.common.local_launcher,
arguments.common.jobs);
- auto commit_git_map = CreateCommitGitMap(&critical_git_op_map,
- arguments.common.just_mr_paths,
- *arguments.common.local_launcher,
- arguments.common.jobs);
+ auto commit_git_map =
+ CreateCommitGitMap(&critical_git_op_map,
+ arguments.common.just_mr_paths,
+ arguments.common.git_path->string(),
+ *arguments.common.local_launcher,
+ arguments.common.jobs);
auto content_git_map = CreateContentGitMap(&content_cas_map,
&import_to_git_map,
&critical_git_op_map,
@@ -1137,9 +1150,11 @@ void DefaultReachableRepositories(
&import_to_git_map,
&critical_git_op_map,
arguments.common.jobs);
- auto tree_id_git_map = CreateTreeIdGitMap(&critical_git_op_map,
- *arguments.common.local_launcher,
- arguments.common.jobs);
+ auto tree_id_git_map =
+ CreateTreeIdGitMap(&critical_git_op_map,
+ arguments.common.git_path->string(),
+ *arguments.common.local_launcher,
+ arguments.common.jobs);
auto repos_to_setup_map = CreateReposToSetupMap(config,
main,
interactive,
@@ -1361,6 +1376,9 @@ auto main(int argc, char* argv[]) -> int {
if (not arguments.common.just_path) {
arguments.common.just_path = kDefaultJustPath;
}
+ if (not arguments.common.git_path) {
+ arguments.common.git_path = kDefaultGitPath;
+ }
bool forward_build_root = true;
if (not arguments.common.just_mr_paths->root) {
forward_build_root = false;