summaryrefslogtreecommitdiff
path: root/ll-merge.c
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-06-08 22:34:29 +0200
committerJunio C Hamano <gitster@pobox.com>2009-06-09 00:15:57 -0700
commit0077138cd9d4f94636184553afd8b33b98d320a1 (patch)
treec2bca49295ed40948af4f7750986ffd71b61d111 /ll-merge.c
parente169b974593c27ba7a0d7f63ec0ec40373cb64bb (diff)
downloadgit-0077138cd9d4f94636184553afd8b33b98d320a1.tar.gz
Simplify some instances of run_command() by using run_command_v_opt().
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'll-merge.c')
-rw-r--r--ll-merge.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/ll-merge.c b/ll-merge.c
index 81c02ad053..31d6f0a2ee 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -175,8 +175,7 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
{ "B", temp[2] },
{ NULL }
};
- struct child_process child;
- const char *args[20];
+ const char *args[] = { "sh", "-c", NULL, NULL };
int status, fd, i;
struct stat st;
@@ -191,14 +190,8 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
strbuf_expand(&cmd, fn->cmdline, strbuf_expand_dict_cb, &dict);
- memset(&child, 0, sizeof(child));
- child.argv = args;
- args[0] = "sh";
- args[1] = "-c";
args[2] = cmd.buf;
- args[3] = NULL;
-
- status = run_command(&child);
+ status = run_command_v_opt(args, 0);
if (status < -ERR_RUN_COMMAND_FORK)
; /* failure in run-command */
else