diff mbox series

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

Message ID 51662178-1002-2f69-fc96-20d603353c11@web.de (mailing list archive)
State New, archived
Headers show
Series run-command: use prepare_git_cmd() in prepare_cmd() | expand

Commit Message

René Scharfe Nov. 26, 2019, 9:06 a.m. UTC
Call prepare_git_cmd() instead of open-coding it.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 run-command.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
2.24.0
diff mbox series

Patch

diff --git a/run-command.c b/run-command.c
index 3449db319b..9942f120a9 100644
--- a/run-command.c
+++ b/run-command.c
@@ -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 {