@matheusbsbs / matheus-bagliano / commits / 3b839fd861
Fork 0

git-svn: default to repacking every 1000 commits

This should reduce disk space usage when doing large imports. We'll be switching to "gc --auto" post-1.5.4 to handle repacking for us. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Wong committed Jan 21, 2008 at 14:37 UTC 3b839fd8610b440f072d0c1c0ec00801347f3793
1 file changed +4 -6
git-svn.perl
+4 -6
@@ -1408,11 +1408,9 @@ sub read_all_remotes {
1408 }
1409
1410 sub init_vars {
1411 - if (defined $_repack) {
1412 - $_repack = 1000 if ($_repack <= 0);
1413 - $_repack_nr = $_repack;
1414 - $_repack_flags ||= '-d';
1415 - }
1411 + $_repack = 1000 unless (defined $_repack && $_repack > 0);
1412 + $_repack_nr = $_repack;
1413 + $_repack_flags ||= '-d';
1414 }
1415
1416 sub verify_remotes_sanity {
@@ -2151,7 +2149,7 @@ sub do_git_commit {
2149 0, $self->svm_uuid);
2150 }
2151 print " = $commit ($self->{ref_id})\n";
2154 - if (defined $_repack && (--$_repack_nr == 0)) {
2152 + if ($_repack && (--$_repack_nr == 0)) {
2153 $_repack_nr = $_repack;
2154 # repack doesn't use any arguments with spaces in them, does it?
2155 print "Running git repack $_repack_flags ...\n";