Re: [PATCH 1/3] repack: modify behavior of -A option to leave unreferenced objects unpacked

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nicolas Pitre
Date: Saturday, May 10, 2008 - 6:10 pm

On Sat, 10 May 2008, Jeff King wrote:


Depends.  If it has no maintenance cost then we might as well keep it 
around.


Having a separate location for objects seems clunky to me.

And the fundamental problem isn't solved indeed -- you may end up with 
many non expired unreachable loose objects already without packing them.


Determining the number of unreachable objects is quite costly, packed or 
not.  So that isn't a good thing to do on every 'git gc --auto' 
invokation.


The auto gc performs incremental packing most of the time.  And that is 
way faster than figuring out which objects are unreachable.

For example, running 'git prune' in my Linux repo takes 16 seconds, even 
when there is nothing to prune.  Running 'git repack' (with no option so 
to perform an incremental repack) took less than 2 seconds to pack 541 
reachable objects that happened to be loose.

I'm now starting to wonder if there is a reason for keeping unreachable 
objects that used to be packed.  Putting --keep-unreachable aside for 
now, the only way an unreachable object could have entered a pack is if 
it used to be reachable before through the commit history or reflog.  
So if they're not reachable anymore, that's most probably because their 
reflog expired.  So what's the point for keeping them even longer?  
What's the reasoning that led to the creation of --keep-unreachable in 
the first place?


Nicolas
--
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:
Re: git gc & deleted branches, Brandon Casey, (Thu May 8, 6:41 pm)
Re: git gc & deleted branches, Junio C Hamano, (Thu May 8, 8:21 pm)
Re: git gc & deleted branches, Jeff King, (Thu May 8, 9:19 pm)
Re: git gc & deleted branches, Geert Bosch, (Fri May 9, 8:00 am)
Re: git gc & deleted branches, Brandon Casey, (Fri May 9, 8:14 am)
Re: git gc & deleted branches, Jeff King, (Fri May 9, 8:53 am)
Re: git gc & deleted branches, Brandon Casey, (Fri May 9, 8:56 am)
Re: git gc & deleted branches, Nicolas Pitre, (Fri May 9, 9:12 am)
Re: git gc & deleted branches, Brandon Casey, (Fri May 9, 9:54 am)
Re: git gc & deleted branches, Junio C Hamano, (Fri May 9, 3:33 pm)
Re: git gc & deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 5:07 pm)
Re: git gc & deleted branches, Shawn O. Pearce, (Fri May 9, 5:20 pm)
Re: git gc & deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 5:43 pm)
Re: git gc & deleted branches, Junio C Hamano, (Fri May 9, 6:21 pm)
Re: git gc & deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 6:51 pm)
Re: git gc & deleted branches, Jeff King, (Fri May 9, 10:25 pm)
Re: git gc & deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 10:36 pm)
Re: git gc & deleted branches, Johannes Schindelin, (Sat May 10, 2:04 am)
Re: git gc & deleted branches, Jeremy Maitin-Shepard, (Sat May 10, 9:24 am)
Re: [PATCH 1/3] repack: modify behavior of -A option to le ..., Nicolas Pitre, (Sat May 10, 6:10 pm)
Re: git gc & deleted branches, Johannes Schindelin, (Sun May 11, 4:11 am)