cloning a namespace downloads all the objects
- From
Sitaram Chamarty <sitaramc@gmail.com>
- Date
- Nov 16, 2012, 16:34 UTC
- Message-ID
- <CAMK1S_hdsgXoPcSn__htpGCpmCsAGb9j+m+SvxtO_69eqC92gA@mail.gmail.com>
Hi,
I have a repo on a server, which contains, as namespaces, the contents of several different repos of varying sizes. When I run a clone command for the smallest of the namespaces (I have a script that intercepts the clone and sets GIT_NAMESPACE appropriately), I get the correct set of refs, but *all* the objects from *all* the namespaces.
And since no refs from the other namespaces have come down, a 'git gc --prune=now', run immediately after, reduces the size of ".git/objects" to the size I would expect for just that small namespace.
In effect, it is bringing down data that is not reachable and will be wiped out on the next gc.
Is this expected?
-- Sitaram