summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c9a0dc)
raw | patch | inline | side by side (parent: 6c9a0dc)
author | Matthias Urlichs <smurf@kiste.(none)> | |
Thu, 30 Jun 2005 09:55:57 +0000 (11:55 +0200) | ||
committer | Matthias Urlichs <smurf@kiste.(none)> | |
Thu, 30 Jun 2005 09:55:57 +0000 (11:55 +0200) |
instead of with a too-long argument list.
git-cvsimport-script | patch | blob | history |
diff --git a/git-cvsimport-script b/git-cvsimport-script
index 0d205c55aa60a65e1157d3cf508c0835bde1c272..f3e2a49e044f86a59d218175cd9bac257d8384d3 100755 (executable)
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
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;