Subject: Re: gc.linkedobjectdir discussion

From: Junio C Hamano <[email-masked]>
Date: Tue, 24 Feb 2015 14:26:08 -0800

Will Entriken <[email-masked]> writes:

> USAGE - CACHE HIT:
> During another pull or clone on a different working directory, git
> will find the required object in LINKEDOBJECTDIR and hard link into
> the active repo's object store.

What happens when the necessary objects are in a packfile, mixed
with other objects that this repository does not need but may be
necessary for other repositories?

> USAGE - DELETING:
> Whenever deleting an object, git will stat the file to see to see if
> its link count is 2, if so, both copies are deleted.

This is totally unworkable if you ever pack your repository.  And
packing loose objects is a lot more efficient way to reduce your
disk footprint than sharing the object store among a handful of
repositories.