Skip to content

Commit 54a7a64

Browse files
rscharfegitster
authored andcommitted
run-command: use prepare_git_cmd() in prepare_cmd()
Call prepare_git_cmd() instead of open-coding it. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit 54a7a64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

run-command.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,7 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)
412412
argv_array_push(out, SHELL_PATH);
413413

414414
if (cmd->git_cmd) {
415-
argv_array_push(out, "git");
416-
argv_array_pushv(out, cmd->argv);
415+
prepare_git_cmd(out, cmd->argv);
417416
} else if (cmd->use_shell) {
418417
prepare_shell_cmd(out, cmd->argv);
419418
} else {

0 commit comments

Comments
 (0)