run-command: use prepare_git_cmd() in prepare_cmd()

Call prepare_git_cmd() instead of open-coding it.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2019-11-26 10:06:36 +01:00 committed by Junio C Hamano
parent 5fa0f5238b
commit 54a7a64613

View File

@ -412,8 +412,7 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)
argv_array_push(out, SHELL_PATH);
if (cmd->git_cmd) {
argv_array_push(out, "git");
argv_array_pushv(out, cmd->argv);
prepare_git_cmd(out, cmd->argv);
} else if (cmd->use_shell) {
prepare_shell_cmd(out, cmd->argv);
} else {