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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Git Mailing List <git@...>
Date: Tuesday, January 22, 2008 - 10:58 pm

On Jan 22, 2008, at 9:46 PM, Junio C Hamano wrote:



I'm actually considering what the cost would be of switching macports  
to git (not that it will ever happen - too many anonymous people pull  
from svn trunk). Right now the svn trunk contains a subfolder for the  
source code and another subfolder for all ~4400+ Portfiles. In such a  
theoretical move, I'd want to split that up, probably into two  
unrelated branches. Doing so would mean running git-filter-branch over  
a linear commit history that's 31580 objects long, with a tree filter  
to prune the dports directory away and a msg filter to remove the svn- 
id stuff that git-svn left behind. This means that every single commit  
objects would be changed, as well as the root tree object for every  
single commit. That would be about 63160 objects. I'd also have to  
figure out some way to remove the commit objects entirely that only  
reference the dports directory. Then I'd have to do it again with the  
opposite tree filter (to prune everything but the dports directory and  
move the contents of the dports directory up one level) and same msg  
filter. Granted, if I do the first action in a branch, that leaves no  
unreachable objects (since the originals are still referenced), but  
the second operation definitely would leave unreachable objects, and  
were I to clone the repository instead and do the operations in the  
different repos (which is perfectly legitimate - otherwise I'd have to  
clone it after everything else and then delete branches) then both  
actions would leave thousands of objects unreachable.

I'd suggest a patch to run git gc --auto, but it looks like you just  
did in a subsequent email. As for your comments about the reflogs,  
can't I disable recording those, at least temporarily? I'd rather  
clean up after myself as I work rather than balloon the repository and  
collapse it in a single operation at the end.

-Kevin Ballard

-- 
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
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)