diff options
| author | Taylor Blau <me@ttaylorr.com> | 2022-11-08 17:15:12 -0500 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2022-11-08 17:15:12 -0500 |
| commit | be4ac3b197f8b4070bdad65dea4a03e1389410a6 (patch) | |
| tree | 9fc342eb7297ce681781e3d2b2b64a0d44d6dcd4 /merge.c | |
| parent | Merge branch 'rs/archive-filter-error-once' (diff) | |
| parent | replace and remove run_command_v_opt() (diff) | |
| download | git-be4ac3b197f8b4070bdad65dea4a03e1389410a6.tar.gz git-be4ac3b197f8b4070bdad65dea4a03e1389410a6.zip | |
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
Diffstat (limited to 'merge.c')
| -rw-r--r-- | merge.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -19,22 +19,22 @@ int try_merge_command(struct repository *r, const char **xopts, struct commit_list *common, const char *head_arg, struct commit_list *remotes) { - struct strvec args = STRVEC_INIT; + struct child_process cmd = CHILD_PROCESS_INIT; int i, ret; struct commit_list *j; - strvec_pushf(&args, "merge-%s", strategy); + strvec_pushf(&cmd.args, "merge-%s", strategy); for (i = 0; i < xopts_nr; i++) - strvec_pushf(&args, "--%s", xopts[i]); + strvec_pushf(&cmd.args, "--%s", xopts[i]); for (j = common; j; j = j->next) - strvec_push(&args, merge_argument(j->item)); - strvec_push(&args, "--"); - strvec_push(&args, head_arg); + strvec_push(&cmd.args, merge_argument(j->item)); + strvec_push(&cmd.args, "--"); + strvec_push(&cmd.args, head_arg); for (j = remotes; j; j = j->next) - strvec_push(&args, merge_argument(j->item)); + strvec_push(&cmd.args, merge_argument(j->item)); - ret = run_command_v_opt(args.v, RUN_GIT_CMD); - strvec_clear(&args); + cmd.git_cmd = 1; + ret = run_command(&cmd); discard_index(r->index); if (repo_read_index(r) < 0) |
