Skip to content

Commit

Permalink
add--interactive: fix external command invocation on Windows
Browse files Browse the repository at this point in the history
Back in 21e9757 (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>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Sep 4, 2013
1 parent e230c56 commit df17e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-add--interactive.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? "\"$_\"": $_ } @_;
Expand Down

0 comments on commit df17e77

Please sign in to comment.