login
Header Space

 
 

Re: git filter-branch should run git gc --auto

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kevin Ballard <kevin@...>
Cc: Git Mailing List <git@...>
Date: Tuesday, January 22, 2008 - 10:52 pm

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


Another thing I forgot to say in my previous message.  The old
refs are kept in reflogs and also in refs/original/, so you will
not be creating new unreachables even if you rewrite many objects.


Something like this, perhaps?

 git-filter-branch.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index ebf05ca..8e44001 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -299,6 +299,12 @@ while read commit parents; do
 			die "msg filter failed: $filter_msg"
 	sh -c "$filter_commit" "git commit-tree" \
 		$(git write-tree) $parentstr < ../message > ../map/$commit
+
+	if test $(( $i % 512 )) = 0
+	then
+		git gc --auto
+	fi
+
 done <../revs
 
 # In case of a subdirectory filter, it is possible that a specified head
-
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, 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