From: Junio C Hamano Date: Sun, 08 Sep 2013 17:35:00 GMT Subject: Re: [PATCH 0/3] Unconfuse git clone when two branches at are HEAD. Message-ID: In-Reply-To: <531DBE1FF66D4356AEE6AEE5C2FE9389@PhilipOakley> "Philip Oakley" 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. > 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.