Message ID | pull.574.git.1583498508362.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | prepare_shell_cmd: add code comment | expand |
Reminder: the patch is still there :(
diff --git a/run-command.c b/run-command.c index f5e1149f9b3..95ab3c168bc 100644 --- a/run-command.c +++ b/run-command.c @@ -284,6 +284,12 @@ static const char **prepare_shell_cmd(struct argv_array *out, const char **argv) argv_array_push(out, argv[0]); else argv_array_pushf(out, "%s \"$@\"", argv[0]); + + /* + * -c expects shell_name after command_string. + * Pushing entire original argv below will pass argv[0] + * as shell name. + */ } argv_array_pushv(out, argv);