From: Linus Torvalds Date: Tue, 23 May 2006 02:28:37 +0000 (-0700) Subject: cvsimport: repack every kilo-commits. X-Git-Tag: v1.4.0-rc1~90 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4adcea995e97361d0900aaf27c60fad0b03b9ad1;p=git.git cvsimport: repack every kilo-commits. Signed-off-by: Linus Torvalds Acked-by: Martin Langhoff Signed-off-by: Junio C Hamano --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 6c232c0d4..712cdc0e3 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -853,10 +853,14 @@ while() { } elsif($state == 9 and /^\s*$/) { $state = 10; } elsif(($state == 9 or $state == 10) and /^-+$/) { - if ($opt_L && $commitcount++ >= $opt_L) { + $commitcount++; + if ($opt_L && $commitcount > $opt_L) { last; } commit(); + if (($commitcount & 1023) == 0) { + system("git repack -a -d"); + } $state = 1; } elsif($state == 11 and /^-+$/) { $state = 1;