Re: [PATCH] fix simple deepening of a repo
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 26, 2009, 08:22 UTC
- Message-ID
- <20090826082256.GO1033@spearce.org>
- In-Reply-To
- <4A94DF84.4050906@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 17 quoted lines
> Shawn O. Pearce schrieb:
> > static void upload_pack(void)
> > {
> > reset_timeout();
> > - head_ref(send_ref, NULL);
> > - for_each_ref(send_ref, NULL);
> > - packet_flush(1);
> > + head_ref(scan_ref, NULL);
> > + for_each_ref(scan_ref, NULL);
> > +
> > + push_advertise("HEAD");
> > + push_advertise("refs/heads/*");
> > + push_advertise("refs/tags/*");
> > + send_refs();
> > +
>
> How will this mesh with 'git clone --mirror'?Not well.
> Is the client expected to > ask with 'expand refs/*'?
If the client is new enough to understand the "expand" extension, yes, it would ask for "expand refs/*" and get everthing, allowing it to complete a full mirror.
If the client is older and doesn't know this extension, then it is hopeless. The server isn't advertising refs/*, doesn't know that the client can't ask for refs/*, and the client doesn't know it is missing refs when it makes the mirror.
This backwards incompatible breakage is something I have no real solution for. :-|
-- Shawn.