Merge branch 'rs/no-more-run-command-v'

Simplify the run-command API.

* rs/no-more-run-command-v:
  replace and remove run_command_v_opt()
  replace and remove run_command_v_opt_cd_env_tr2()
  replace and remove run_command_v_opt_tr2()
  replace and remove run_command_v_opt_cd_env()
  use child_process members "args" and "env" directly
  use child_process member "args" instead of string array variable
  sequencer: simplify building argument list in do_exec()
  bisect--helper: factor out do_bisect_run()
  bisect: simplify building "checkout" argument list
  am: simplify building "show" argument list
  run-command: fix return value comment
  merge: remove always-the-same "verbose" arguments
This commit is contained in:
Taylor Blau
2022-11-08 17:15:12 -05:00
27 changed files with 344 additions and 381 deletions

View File

@ -1972,14 +1972,17 @@ static int fetch_multiple(struct string_list *list, int max_children)
} else
for (i = 0; i < list->nr; i++) {
const char *name = list->items[i].string;
strvec_push(&argv, name);
struct child_process cmd = CHILD_PROCESS_INIT;
strvec_pushv(&cmd.args, argv.v);
strvec_push(&cmd.args, name);
if (verbosity >= 0)
printf(_("Fetching %s\n"), name);
if (run_command_v_opt(argv.v, RUN_GIT_CMD)) {
cmd.git_cmd = 1;
if (run_command(&cmd)) {
error(_("could not fetch %s"), name);
result = 1;
}
strvec_pop(&argv);
}
strvec_clear(&argv);