Re: [PATCH 0/3] Unconfuse git clone when two branches at are HEAD.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 8, 2013, 17:35 UTC
- Message-ID
- <xmqqk3ir6wu3.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <531DBE1FF66D4356AEE6AEE5C2FE9389@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
> What I observed was that all the clones had the same HEAD problem, > which I think comes from clone.c: guess_remote_head().
Yes. They share "having to guess" property because their data source does not tell them.
Show 6 quoted lines
> My quick look at clone.c suggested to me that there would be a lot of > commonality between the bundle data stream and the transport streams > (identical?), and it was just a case of adding into the bundle data > the same HEAD symref indication that would solve the normal clone > problem (including backward compatibility). Is that a reasonable > assesssment?
You need to find a hole in the existing readers to stick the new information in a way that do not break existing readers but allow updated readers to extract that information. That is exactly what we did when we added the protocol capability. I do not offhand think an equivalent hole exists in the bundle file format.