On Thu, Jun 4, 2020 at 7:01 PM brian m. carlson wrote: > If you really need Git functionality that doesn't rely on sh, you can > look into libgit2 and its assorted language wrappers. Uh yeah, no. Im not reimplementing the entire Git program, when the fix is 7 lines. Here it is, if anyone is interested: diff --git a/run-command.c b/run-command.c index 9b3a57d..4945632 100644 --- a/run-command.c +++ b/run-command.c @@ -271,9 +271,6 @@ static const char **prepare_shell_cmd(struct argv_array *out, const char **argv) if (strcspn(argv[0], "|&;<>()$`\\\"' \t\n*?[#~=%") != strlen(argv[0])) { #ifndef GIT_WINDOWS_NATIVE argv_array_push(out, SHELL_PATH); -#else - argv_array_push(out, "sh"); -#endif argv_array_push(out, "-c"); /* @@ -284,6 +281,10 @@ 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]); +#else + argv_array_push(out, "powershell"); + argv_array_push(out, "-Command"); +#endif } argv_array_pushv(out, argv);