Re: git clone sending unneeded objects
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Sep 27, 2009, 02:04 UTC
- Message-ID
- <20090927020409.GK14660@spearce.org>
- In-Reply-To
- <alpine.LFD.2.00.0909262059520.4997@xanadu.home>
Nicolas Pitre <nico@fluxnic.net> wrote:
Show 10 quoted lines
> And even if the broken clone (before my patch) did pull everything from > gcc.git, in the cloned repository those 410610 extra objects are > considered as garbage because nothing actually reference them. So even > if you decide to fetch the extra branches that the initial clone didn't > pick up, or if you do reference that repository with "garbage" objects > for another clone to which you want to add those extra branches, git has > no way to know that it already had access to those objects locally and > "ungarbage" them as they aren't referenced. Result is a useless fetch > of 410610 objects that you already have, but that you weren't supposed > to have in the first place.
Just to clarify a minor nit:
Actually, if those refs have not changed, quickfetch should kick in and realize that all 410610 objects are reachable locally without errors, permitting the client to avoid the object transfer.
However, if *ANY* of those refs were to change to something you don't actually have, quickfetch would fail, and we would need to fetch all 410610 objects.
-- Shawn.