Re: git clone sending unneeded objects
- From
Nicolas Pitre <nico@fluxnic.net>
- Date
- Sep 27, 2009, 02:31 UTC
- Message-ID
- <alpine.LFD.2.00.0909262228210.4997@xanadu.home>
- In-Reply-To
- <20090927020409.GK14660@spearce.org>
On Sat, 26 Sep 2009, Shawn O. Pearce wrote:
Show 21 quoted lines
> Nicolas Pitre <nico@fluxnic.net> wrote: > > 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.
Right. But since we're talking about a git mirror for the gcc svn repo and gcc is a rather active project, the likelyhood of any ref to change at any time is rather high.
Nicolas