File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,24 @@ sub run_cmd_pipe {
177
177
die " $^O does not support: @invalid \n" if @invalid ;
178
178
my @args = map { m/ /o ? " \" $_ \" " : $_ } @_ ;
179
179
return qx{ @args } ;
180
+ } elsif (($^O eq ' MSWin32' || $^O eq ' msys' ) && (scalar @_ > 200) &&
181
+ grep $_ eq ' --' , @_ ) {
182
+ use File::Temp qw( tempfile) ;
183
+ my ($fhargs , $filename ) =
184
+ tempfile(' git-args-XXXXXX' , UNLINK => 1);
185
+
186
+ my $cmd = ' cat ' .$filename .' | xargs -0 -s 20000 ' ;
187
+ while ($_ [0] ne ' --' ) {
188
+ $cmd = $cmd . shift (@_ ) . ' ' ;
189
+ }
190
+
191
+ shift (@_ );
192
+ print $fhargs join (" \0 " , @_ );
193
+ close ($fhargs );
194
+
195
+ my $fh = undef ;
196
+ open ($fh , ' -|' , $cmd ) or die ;
197
+ return <$fh >;
180
198
} else {
181
199
my $fh = undef ;
182
200
open ($fh , ' -|' , @_ ) or die ;
You can’t perform that action at this time.
0 commit comments