diff options
author | Taylor Blau <me@ttaylorr.com> | 2022-11-08 23:15:12 +0100 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-11-08 23:15:12 +0100 |
commit | be4ac3b197f8b4070bdad65dea4a03e1389410a6 (patch) | |
tree | 9fc342eb7297ce681781e3d2b2b64a0d44d6dcd4 /ll-merge.c | |
parent | Merge branch 'rs/archive-filter-error-once' (diff) | |
parent | replace and remove run_command_v_opt() (diff) | |
download | git-be4ac3b197f8b4070bdad65dea4a03e1389410a6.tar.xz 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 'll-merge.c')
-rw-r--r-- | ll-merge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ll-merge.c b/ll-merge.c index a8e2db9336..22a603e8af 100644 --- a/ll-merge.c +++ b/ll-merge.c @@ -193,7 +193,7 @@ static enum ll_merge_result ll_ext_merge(const struct ll_merge_driver *fn, struct strbuf cmd = STRBUF_INIT; struct strbuf_expand_dict_entry dict[6]; struct strbuf path_sq = STRBUF_INIT; - const char *args[] = { NULL, NULL }; + struct child_process child = CHILD_PROCESS_INIT; int status, fd, i; struct stat st; enum ll_merge_result ret; @@ -219,8 +219,9 @@ static enum ll_merge_result ll_ext_merge(const struct ll_merge_driver *fn, strbuf_expand(&cmd, fn->cmdline, strbuf_expand_dict_cb, &dict); - args[0] = cmd.buf; - status = run_command_v_opt(args, RUN_USING_SHELL); + child.use_shell = 1; + strvec_push(&child.args, cmd.buf); + status = run_command(&child); fd = open(temp[1], O_RDONLY); if (fd < 0) goto bad; |