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