@matheusbsbs / matheus-bagliano / commits / 4adcea995e
Fork 0

cvsimport: repack every kilo-commits.

Signed-off-by: Linus Torvalds <torvalds@osdl.org> Acked-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>

Linus Torvalds committed May 22, 2006 at 19:28 UTC 4adcea995e97361d0900aaf27c60fad0b03b9ad1
1 file changed +5 -1
git-cvsimport.perl
+5 -1
@@ -853,10 +853,14 @@ while(<CVS>) {
853 } elsif($state == 9 and /^\s*$/) {
854 $state = 10;
855 } elsif(($state == 9 or $state == 10) and /^-+$/) {
856 - if ($opt_L && $commitcount++ >= $opt_L) {
856 + $commitcount++;
857 + if ($opt_L && $commitcount > $opt_L) {
858 last;
859 }
860 commit();
861 + if (($commitcount & 1023) == 0) {
862 + system("git repack -a -d");
863 + }
864 $state = 1;
865 } elsif($state == 11 and /^-+$/) {
866 $state = 1;