X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=trailer.c;h=68dabc2556c8232e1df268ae9f82d539505541ef;hb=eb7460fd312511941d64007b5dfc4799a20a8d18;hp=0c414f2fed2b5701f616eb2d88a386e5da16fda8;hpb=c9808fa014aa88cc306705d308d1d9065d567ddc;p=thirdparty%2Fgit.git diff --git a/trailer.c b/trailer.c index 0c414f2fed..68dabc2556 100644 --- a/trailer.c +++ b/trailer.c @@ -221,15 +221,13 @@ static char *apply_command(const char *command, const char *arg) struct strbuf cmd = STRBUF_INIT; struct strbuf buf = STRBUF_INIT; struct child_process cp = CHILD_PROCESS_INIT; - const char *argv[] = {NULL, NULL}; char *result; strbuf_addstr(&cmd, command); if (arg) strbuf_replace(&cmd, TRAILER_ARG_STRING, arg); - argv[0] = cmd.buf; - cp.argv = argv; + strvec_push(&cp.args, cmd.buf); cp.env = local_repo_env; cp.no_stdin = 1; cp.use_shell = 1;