mirror of
https://github.com/git/git.git
synced 2025-03-16 19:55:17 +00:00
cvs import: Call git-update-cache multiple times
instead of with a too-long argument list.
This commit is contained in:
parent
6c9a0dc2b5
commit
4abdecbf85
@ -397,10 +397,28 @@ my($patchset,$date,$author,$branch,$ancestor,$tag,$logmsg);
|
|||||||
my(@old,@new);
|
my(@old,@new);
|
||||||
my $commit = sub {
|
my $commit = sub {
|
||||||
my $pid;
|
my $pid;
|
||||||
system("git-update-cache","--force-remove","--",@old) if @old;
|
while(@old) {
|
||||||
die "Cannot remove files: $?\n" if $?;
|
my @o2;
|
||||||
system("git-update-cache","--add","--",@new) if @new;
|
if(@old > 55) {
|
||||||
die "Cannot add files: $?\n" if $?;
|
@o2 = splice(@old,0,50);
|
||||||
|
} else {
|
||||||
|
@o2 = @old;
|
||||||
|
@old = ();
|
||||||
|
}
|
||||||
|
system("git-update-cache","--force-remove","--",@o2);
|
||||||
|
die "Cannot remove files: $?\n" if $?;
|
||||||
|
}
|
||||||
|
while(@new) {
|
||||||
|
my @n2;
|
||||||
|
if(@new > 55) {
|
||||||
|
@n2 = splice(@new,0,50);
|
||||||
|
} else {
|
||||||
|
@n2 = @new;
|
||||||
|
@new = ();
|
||||||
|
}
|
||||||
|
system("git-update-cache","--add","--",@n2);
|
||||||
|
die "Cannot add files: $?\n" if $?;
|
||||||
|
}
|
||||||
|
|
||||||
$pid = open(C,"-|");
|
$pid = open(C,"-|");
|
||||||
die "Cannot fork: $!" unless defined $pid;
|
die "Cannot fork: $!" unless defined $pid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user