aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-21 14:37:41 -0800
committerJunio C Hamano <gitster@pobox.com>2008-01-22 01:45:40 -0800
commit3b839fd8610b440f072d0c1c0ec00801347f3793 (patch)
tree245957746f7b79c6879bf234d1a88e2dbe4d7ac7 /git-svn.perl
parent4f5f998fbd64c997ea875d69fd86b6362e04ce9b (diff)
downloadgit-3b839fd8610b440f072d0c1c0ec00801347f3793.tar.gz
git-3b839fd8610b440f072d0c1c0ec00801347f3793.tar.xz
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl10
1 files changed, 4 insertions, 6 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 9f2b587b2..75e97cc72 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1408,11 +1408,9 @@ sub read_all_remotes {
}
sub init_vars {
- if (defined $_repack) {
- $_repack = 1000 if ($_repack <= 0);
- $_repack_nr = $_repack;
- $_repack_flags ||= '-d';
- }
+ $_repack = 1000 unless (defined $_repack && $_repack > 0);
+ $_repack_nr = $_repack;
+ $_repack_flags ||= '-d';
}
sub verify_remotes_sanity {
@@ -2151,7 +2149,7 @@ sub do_git_commit {
0, $self->svm_uuid);
}
print " = $commit ($self->{ref_id})\n";
- if (defined $_repack && (--$_repack_nr == 0)) {
+ if ($_repack && (--$_repack_nr == 0)) {
$_repack_nr = $_repack;
# repack doesn't use any arguments with spaces in them, does it?
print "Running git repack $_repack_flags ...\n";