summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@kiste.(none)>2005-06-30 09:55:57 (GMT)
committerMatthias Urlichs <smurf@kiste.(none)>2005-06-30 09:55:57 (GMT)
commit4abdecbf85151b4881aed4840e84823a112f96a5 (patch)
tree3d74310594a93842da06c7ceb73cff9c1d9c4c00
parent6c9a0dc2b5fffdb67593ee6bb828fcc578b84207 (diff)
downloadgit-4abdecbf85151b4881aed4840e84823a112f96a5.zip
git-4abdecbf85151b4881aed4840e84823a112f96a5.tar.gz
git-4abdecbf85151b4881aed4840e84823a112f96a5.tar.bz2
cvs import: Call git-update-cache multiple times
instead of with a too-long argument list.
-rwxr-xr-xgit-cvsimport-script26
1 files changed, 22 insertions, 4 deletions
diff --git a/git-cvsimport-script b/git-cvsimport-script
index 0d205c5..f3e2a49 100755
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -397,10 +397,28 @@ my($patchset,$date,$author,$branch,$ancestor,$tag,$logmsg);
my(@old,@new);
my $commit = sub {
my $pid;
- system("git-update-cache","--force-remove","--",@old) if @old;
- die "Cannot remove files: $?\n" if $?;
- system("git-update-cache","--add","--",@new) if @new;
- die "Cannot add files: $?\n" if $?;
+ while(@old) {
+ my @o2;
+ if(@old > 55) {
+ @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,"-|");
die "Cannot fork: $!" unless defined $pid;