We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
add -p
add -i
1 parent fd6f15b commit f3e9069Copy full SHA for f3e9069
git-add--interactive.perl
@@ -177,6 +177,24 @@ sub run_cmd_pipe {
177
die "$^O does not support: @invalid\n" if @invalid;
178
my @args = map { m/ /o ? "\"$_\"": $_ } @_;
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>;
198
} else {
199
my $fh = undef;
200
open($fh, '-|', @_) or die;
0 commit comments