git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Steven Penny <svnpenn@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org
Subject: Re: Change Native Windows shell
Date: Thu, 4 Jun 2020 23:21:32 -0500	[thread overview]
Message-ID: <CAAXzdLVk3jLzuB2vgKGObQDjPydpdiawKJJ+-NMa376Gu1zt1A@mail.gmail.com> (raw)
In-Reply-To: <20200605000039.GB6569@camp.crustytoothpaste.net>

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);

  reply	other threads:[~2020-06-05  4:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 23:33 Change Native Windows shell Steven Penny
2020-06-05  0:00 ` brian m. carlson
2020-06-05  4:21   ` Steven Penny [this message]
2020-06-05  4:39     ` Jonathan Nieder
2020-06-08 17:39     ` Johannes Schindelin
2020-06-08 23:14       ` Steven Penny
2020-06-09  6:12         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAXzdLVk3jLzuB2vgKGObQDjPydpdiawKJJ+-NMa376Gu1zt1A@mail.gmail.com \
    --to=svnpenn@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).