aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/merge-index.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2022-11-08 17:15:12 -0500
committerTaylor Blau <me@ttaylorr.com>2022-11-08 17:15:12 -0500
commitbe4ac3b197f8b4070bdad65dea4a03e1389410a6 (patch)
tree9fc342eb7297ce681781e3d2b2b64a0d44d6dcd4 /builtin/merge-index.c
parentMerge branch 'rs/archive-filter-error-once' (diff)
parentreplace and remove run_command_v_opt() (diff)
downloadgit-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 'builtin/merge-index.c')
-rw-r--r--builtin/merge-index.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index c0383fe9df..012f52bd00 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -12,6 +12,7 @@ static int merge_entry(int pos, const char *path)
const char *arguments[] = { pgm, "", "", "", path, "", "", "", NULL };
char hexbuf[4][GIT_MAX_HEXSZ + 1];
char ownbuf[4][60];
+ struct child_process cmd = CHILD_PROCESS_INIT;
if (pos >= active_nr)
die("git merge-index: %s not in the cache", path);
@@ -31,7 +32,8 @@ static int merge_entry(int pos, const char *path)
if (!found)
die("git merge-index: %s not in the cache", path);
- if (run_command_v_opt(arguments, 0)) {
+ strvec_pushv(&cmd.args, arguments);
+ if (run_command(&cmd)) {
if (one_shot)
err++;
else {