Skip to content

Commit

Permalink
cvsimport: repack every kilo-commits.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed May 23, 2006
1 parent 0691834 commit 4adcea9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,14 @@ sub commit {
} 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;
Expand Down

0 comments on commit 4adcea9

Please sign in to comment.