From: Jeff King Date: Sun, 08 Sep 2013 07:22:43 GMT Subject: Re: [PATCH 1/3] upload-pack: send the HEAD information Message-ID: <20130908072243.GK14019@sigill.intra.peff.net> In-Reply-To: <20130908071359.GJ14019@sigill.intra.peff.net> On Sun, Sep 08, 2013 at 03:13:59AM -0400, Jeff King wrote: > What do you think about teaching git to read extra data after "\0" for > _every_ ref line? And then ref advertisement might look something like: > > HEAD\0multi_ack thin-pack ... symref=refs/heads/master\n > refs/heads/master\n > refs/heads/my-alias\0symref=refs/heads/master > > That would leave us future room for more ref annotations if we should > want them, and I think (but haven't tested) that existing receivers > should ignore everything after the NUL. Meh, elsewhere you said: The capability list _could_ be sent more than once, and the receiving end is prepared to accept such a stream. Everything learned from an older capability list needs to be forgot and only the last one is honored, I think. and I think you are right. We simply keep a copy of the string the server sent, and when we see a new one, we free the old and replace it. So each subsequent ref would have to re-send the whole capability string (only if it is a symref, but still, it is somewhat ugly). -Peff