add--interactive: fix external command invocation on Windows
authorJohannes Sixt <j6t@kdbg.org>
Wed, 4 Sep 2013 07:24:47 +0000 (09:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Sep 2013 17:35:25 +0000 (10:35 -0700)
Back in 21e9757e (Hack git-add--interactive to make it work with
ActiveState Perl, 2007-08-01), the invocation of external commands was
changed to use qx{} on Windows. The rationale was that the command
interpreter on Windows is not a POSIX shell, but rather Windows's CMD.
That patch was wrong to include 'msys' in the check whether to use qx{}
or not: 'msys' identifies MSYS perl as shipped with Git for Windows,
which does not need the special treatment; qx{} should be used only with
ActiveState perl, which is identified by 'MSWin32'.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl
index 75a991f7ec8a2e4926cb925ad9ff23be2f6aedeb..51563840f49089cf250992fd47fe70a45cef0c52 100755 (executable)
@@ -169,7 +169,7 @@ sub colored {
 my %patch_mode_flavour = %{$patch_modes{stage}};
 
 sub run_cmd_pipe {
-       if ($^O eq 'MSWin32' || $^O eq 'msys') {
+       if ($^O eq 'MSWin32') {
                my @invalid = grep {m/[":*]/} @_;
                die "$^O does not support: @invalid\n" if @invalid;
                my @args = map { m/ /o ? "\"$_\"": $_ } @_;