aboutsummaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl6
1 files changed, 5 insertions, 1 deletions
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(<CVS>) {
} 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;