From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH v3 0/8] Hiding refs Date: Tue, 11 Mar 2014 16:36:50 -0400 Message-ID: <20140311203650.GA31173@sigill.intra.peff.net> References: <5110DF1D.8010505@alum.mit.edu> <7v4nhpckwd.fsf@alter.siamese.dyndns.org> <7vmwvh9e3p.fsf@alter.siamese.dyndns.org> <20140311014945.GB12033@sigill.intra.peff.net> <20140311200513.GB29102@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Duy Nguyen , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= , Michael Haggerty , Jonathan Nieder , Git Mailing List , Shawn Pearce To: Junio C Hamano X-From: git-owner@vger.kernel.org Tue Mar 11 21:36:58 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WNTQ1-0008HQ-PR for gcvg-git-2@plane.gmane.org; Tue, 11 Mar 2014 21:36:58 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755753AbaCKUgx (ORCPT ); Tue, 11 Mar 2014 16:36:53 -0400 Received: from cloud.peff.net ([50.56.180.127]:37621 "HELO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755745AbaCKUgw (ORCPT ); Tue, 11 Mar 2014 16:36:52 -0400 Received: (qmail 28887 invoked by uid 102); 11 Mar 2014 20:36:52 -0000 Received: from c-71-63-4-13.hsd1.va.comcast.net (HELO sigill.intra.peff.net) (71.63.4.13) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Tue, 11 Mar 2014 15:36:52 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Tue, 11 Mar 2014 16:36:50 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Tue, Mar 11, 2014 at 01:25:23PM -0700, Junio C Hamano wrote: > > Yeah, good idea. I might be misremembering some complications, but we > > can probably do it with: > > > > 1. Teach the client to send an "advertise-symrefs" flag before the ref > > advertisement. > > > > 2. Teach the server to include symrefs in the ref advertisement; we > > can invent a new syntax because we know the client has asked for > > it. > > I was thinking more about the underlying protocol, not advertisement > in particular, and I think we came to the same conclusion. > > The capability advertisement deserves to have its own separate > packet message type, when both sides say that they understand it, so > that we do not have to be limited by the pkt-line length limit. We > could do one message per capability, and at the same time can lift > the traditional "capability hidden after the NUL is purged every > time, so we need to repeat them if we want to later change it, > because that is how older clients and servers use that information" > insanity, for example. So this may be entering the "more radical changes" realm I mentioned earlier. If the client is limited to setting a few flags, then something like http can get away with: GET foo.git/info/refs?service=git-upload-pack&advertise-symrefs&refspec=refs/heads/* And it does not need to worry about upload-pack2 at all. Either the server recognizes and acts on them, or it ignores them. But given that we do not have such a magic out-of-band method for passing values over ssh and git, maybe it is not worth worrying about. Http can move to upload-pack2 along with the rest. One thing that _is_ worth considering for http is how the protocol starts. We do not want to introduce an extra http round-trip to the protocol if we can help it. If the initial GET becomes a POST, then it could pass along the pkt-line of client capabilities with the initial request, and the server would respond with the ref advertisement as usual. -Peff