Web lists-archives.com

Re: What's cooking in git.git (Nov 2018, #06; Wed, 21)

On Sun, Nov 25, 2018 at 11:02:05AM +0900, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> > I do also think in the long run we should be fixing the "unreachable
> > always become loose" issues.
> I think I've seen an idea of collecting them into a garbage pack
> floated for at least a few times here.  What are the downsides?  We
> no longer will know when these unreachable ones were last accessed
> individually so we need to come up with a different policy around
> their expiration?  As the common traits among objects in such a
> garbage pack (iow the way we discover the objects that need to be
> placed in there) does not involve path information and we lose the
> ability to compress them well?

Yes, the main issue is handling the expiration/mtime.

We may lose some input to the delta heuristics, but:

  - the current alternative is non-delta loose objects (so just shoving
    those in a pack is no worse for disk space, and probably better
    because of less inode/file overhead)

  - if they were already packed we can often just retain the existing
    deltas (and we get this basically for free with the existing code)

  - we could still walk unreachable bits of the graph, starting at
    dangling commits, to find the path information (we do this to some
    degree already to avoid dropping objects depended on by "unreachable
    but recent" objects, but I don't know how systematic we are about
    making sure to hit walk down from root trees first)

The most thorough discussion I know of in this direction is the one