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