On Fri, Jan 06, 2012 at 03:12:30PM +0100, mhagger@xxxxxxxxxxxx wrote: > Receive pack currently uses "extra refs" to keep track of ".have" > references, which in turn are used to tell the source the SHA1s of > references that are already known to the repository via alternates. > > But the code already creates an array holding the alternate SHA1s. So > just read the SHA1s out of this array rather then round-tripping them > through the extra_refs mechanism. > > This is one step towards hopefully abolishing extra_refs altogether. > I still have to examine the other user. Thanks, this is a nice simplification. The patches look good to me, and they produce the same output for a simple test (I happened to be fiddling with receive-pack and alternates yesterday, so I had a nice test case right at hand :) ). > receive-pack: move more work into write_head_info() BTW, I have a patch to make sending ".have" refs configurable[1] (it adds a receive.advertiseAlternates config variable), which this patch conflicts with. I don't think that is your problem, but I thought I would mention it since you are working in the area. Is that something we want in git? -Peff [1] We are using it at GitHub because our alternates repos are so huge that the overhead of advertising the refs outweighs the minor benefits you get from avoiding object transfer. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html