login
Header Space

 
 

Re: [PATCH] Let "git svn" run "git gc --auto" occasionally

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Karl <kha@...>, Harvey Harrison <harvey.harrison@...>, <git@...>, Kevin Ballard <kevin@...>
Date: Monday, January 21, 2008 - 6:48 pm

Junio C Hamano <gitster@pobox.com> wrote:

Sorry for the latency[1], ack on both of Karl's patches for post-1.5.4.

Here's a conservative change for 1.5.4 (not at all tested):

From dbccd8081c6422569a9ca1211e27f56a24fdf3f3 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 21 Jan 2008 14:37:41 -0800
Subject: [PATCH] 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>
---
 git-svn.perl |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 9f2b587..12745d5 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 {
-- 
Eric Wong

[1] - I've been busy with other things and will also be traveling
      this week, too.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-svn should default to --repack, Kevin Ballard, (Fri Jan 18, 8:17 am)
Re: git-svn should default to --repack, Karl , (Fri Jan 18, 11:56 am)
Re: git-svn should default to --repack, Junio C Hamano, (Fri Jan 18, 4:44 pm)
Re: git-svn should default to --repack, Karl , (Sat Jan 19, 8:35 am)
Re: git-svn should default to --repack, Kevin Ballard, (Sat Jan 19, 11:05 am)
Re: [PATCH] Let "git svn" run "git gc --auto" occasionally, Harvey Harrison, (Sat Jan 19, 6:50 pm)
Re: [PATCH] Let "git svn" run "git gc --auto" occasionally, Junio C Hamano, (Sun Jan 20, 3:17 pm)
Re: [PATCH] Let "git svn" run "git gc --auto" occasionally, Eric Wong, (Mon Jan 21, 6:48 pm)
Re: [PATCH] Let "git svn" run "git gc --auto" occasionally, Junio C Hamano, (Mon Jan 21, 8:30 pm)
Re: [PATCH] Let "git svn" run "git gc --auto" occasionally, Junio C Hamano, (Mon Jan 21, 9:52 pm)
git filter-branch should run git gc --auto, Kevin Ballard, (Tue Jan 22, 10:43 pm)
Re: git filter-branch should run git gc --auto, Junio C Hamano, (Tue Jan 22, 10:46 pm)
Re: git filter-branch should run git gc --auto, Junio C Hamano, (Tue Jan 22, 10:52 pm)
Re: git filter-branch should run git gc --auto, Kevin Ballard, (Tue Jan 22, 11:03 pm)
Re: git filter-branch should run git gc --auto, Kevin Ballard, (Tue Jan 22, 10:58 pm)
Re: git filter-branch should run git gc --auto, Sam Vilain, (Wed Jan 23, 1:07 am)
Re: git filter-branch should run git gc --auto, Kevin Ballard, (Wed Jan 23, 4:18 am)
Re: git filter-branch should run git gc --auto, Mike Hommey, (Wed Jan 23, 2:44 am)
Re: git filter-branch should run git gc --auto, Johannes Schindelin, (Wed Jan 23, 9:00 am)
Re: git filter-branch should run git gc --auto, Junio C Hamano, (Wed Jan 23, 3:22 pm)
Re: git filter-branch should run git gc --auto, Harvey Harrison, (Tue Jan 22, 10:54 pm)
[PATCH 0/2] "git svn" and "git gc --auto", Karl , (Sun Feb 3, 12:55 pm)
speck-geostationary