git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cloning a namespace downloads all the objects

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 16, 2012, 16:43 UTC
Message-ID
<7vvcd57b32.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAMK1S_hdsgXoPcSn__htpGCpmCsAGb9j+m+SvxtO_69eqC92gA@mail.gmail.com>
Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 17 quoted lines
> 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?
I do not think so.

This was done with a series between a1bea2c (ref namespaces: infrastructure, 2011-07-05) and bf7930c (ref namespaces: tests, 2011-07-21); Josh, care to comment on and to look into it?

Previous: Sitaram ChamartyNext: Jeff King
Message 2 of 3 in “cloning a namespace downloads all the objects”
  1. Sitaram ChamartyNov 16, 2012
  2. Junio C HamanoNov 16, 2012
  3. Jeff KingNov 16, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.