git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Jonathan Tan <jonathantanmy@google.com>,
	git@vger.kernel.org, spearce@spearce.org, sbeller@google.com
Subject: Re: [PATCH v2 2/2] connect: advertized capability is not a ref
Date: Fri, 2 Sep 2016 20:56:53 -0400	[thread overview]
Message-ID: <20160903005653.vzt3vel25vino7yk@sigill.intra.peff.net> (raw)
In-Reply-To: <20160902235145.GI14758@google.com>

On Fri, Sep 02, 2016 at 04:51:45PM -0700, Jonathan Nieder wrote:

> > I'd be more interested in the pain of this transition if there was a
> > concrete use case for "hide literally all refs, but still allow
> > fetches". Is that a thing that people do?
> 
> Sure, it is a thing that people do.  For example I've seen replication
> systems that learn what SHA-1s to fetch out-of-band and then use this
> approach to avoid the overhead of a long ref advertisement.

I know that's how those features work. I was more wondering if it ever
comes up that somebody actually has hidden refs, but _no_ non-hidden
ones. Do the systems you've seen hide all the refs?

> However, that is not my motivation.  My motivation is being able to
> extend the protocol in the future.  The capabilities line has been
> important for that historically.

Sure, I agree it's a nice move forward for compatibility. But that
argues for teaching the clients to handle it (for the future), and then
turning it on in the server only when it becomes useful (i.e., the "in a
year or so" can become "when we find a use for it").

In a similar vein, I'd think that a config to enable this in upload-pack
today could have an "auto" mode, which enables it _only_ when you know
something productive might come of it (namely that you have hidden refs,
one of the uploadpack.allow* features is enabled, and the ref
advertisement is empty). Then requests which could not benefit from it
at all do not have to pay the potential compatibility cost.

> Do you have any objection to the server gaining support for this
> guarded by a configuration option?  Then when the time comes to
> consider flipping the default we can use real-world statistics about
> what git client versions people use to make an informed decision.

Guarded by config, no. It's the flipping of the default I care more
about. The config is not necessary in the meantime for getting
real-world statistics; you can add the config and flip the default as
one unit at any time (the thing that is time-critical is teaching the
client to handle _both_ cases gracefully).

The config is useful in the meantime if there are people who could
benefit from it immediately, and don't mind paying the compatibility
cost. With an "auto" as I described above, using that as the default
seems like a decent interim behavior (i.e., why would you set up such a
repository if you didn't expect most clients to use the allowTipSHA1
feature?). I'd still probably give some lag between shipping the client,
and flipping the server default to "auto".

I hoped to share some numbers on what versions people are currently
using against GitHub, to get a sense of how far back most people are.
But I haven't been actively involved in keeping those numbers for a
while, and I'm not sure what we have readily stored. I did show some
numbers a few years ago[1], and it looks like about 2/3 of people were
within 6-12 months of the latest version, but the rest was a long tail.

I don't know if that will have changed with the advent of more client
versions (e.g., lots more people are using libgit2 now via GUI clients,
Visual Studio, etc; how does it fare with the proposed change?).

-Peff

[1] http://public-inbox.org/git/20120531114801.GA21367@sigill.intra.peff.net/

  reply	other threads:[~2016-09-03  0:56 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 17:15 [PATCH 0/2] handle empty spec-compliant remote repos correctly Jonathan Tan
2016-09-02 17:15 ` [PATCH 1/2] tests: move test_lazy_prereq JGIT to test-lib.sh Jonathan Tan
2016-09-02 17:15 ` [PATCH 2/2] connect: know that zero-ID is not a ref Jonathan Tan
2016-09-02 19:37   ` Jonathan Nieder
2016-09-02 19:39   ` Shawn Pearce
2016-09-02 19:56     ` Stefan Beller
2016-09-02 20:00       ` Shawn Pearce
2016-09-02 20:13   ` Jeff King
2016-09-02 22:11     ` Jonathan Tan
2016-09-02 23:19       ` Jeff King
2016-09-03  2:03     ` Shawn Pearce
2016-09-03  2:17       ` Jeff King
2016-09-02 22:06 ` [PATCH v2 0/2] handle empty spec-compliant remote repos correctly Jonathan Tan
2016-09-02 22:06 ` [PATCH v2 1/2] tests: move test_lazy_prereq JGIT to test-lib.sh Jonathan Tan
2016-09-07 16:47   ` Junio C Hamano
2016-09-02 22:06 ` [PATCH v2 2/2] connect: advertized capability is not a ref Jonathan Tan
2016-09-02 22:40   ` Jonathan Nieder
2016-09-02 23:35   ` Jeff King
2016-09-02 23:48     ` Stefan Beller
2016-09-03  0:37       ` Jonathan Nieder
2016-09-02 23:51     ` Jonathan Nieder
2016-09-03  0:56       ` Jeff King [this message]
2016-09-07 17:02   ` Junio C Hamano
2016-09-07 17:10   ` Junio C Hamano
2016-09-07 20:38     ` Jonathan Nieder
2016-09-07 23:02       ` Junio C Hamano
2016-09-07 23:50 ` [PATCH v3 0/2] handle empty spec-compliant remote repos correctly Jonathan Tan
2016-09-07 23:50 ` [PATCH v3 1/2] tests: move test_lazy_prereq JGIT to test-lib.sh Jonathan Tan
2016-09-07 23:50 ` [PATCH v3 2/2] connect: advertized capability is not a ref Jonathan Tan
2016-09-08  1:34   ` Jonathan Nieder
2016-09-08  1:45     ` [PATCH] connect: tighten check for unexpected early hang up (Re: [PATCH v3 2/2] connect: advertized capability is not a ref) Jonathan Nieder
2016-09-08  1:46       ` Jonathan Nieder
2016-09-08  1:50       ` Jonathan Nieder
2016-09-08 16:42         ` Junio C Hamano
2016-09-08 16:28       ` Stefan Beller
2016-09-08 16:18     ` [PATCH v3 2/2] connect: advertized capability is not a ref Junio C Hamano
2016-09-09 17:36 ` [PATCH v4 0/3] handle empty spec-compliant remote repos correctly Jonathan Tan
2016-09-09 17:36 ` [PATCH v4 1/3] tests: move test_lazy_prereq JGIT to test-lib.sh Jonathan Tan
2016-09-10  5:51   ` Torsten Bögershausen
2016-09-10  6:00     ` Jeff King
2016-09-09 17:36 ` [PATCH v4 2/3] connect: tighten check for unexpected early hang up Jonathan Tan
2016-09-09 17:36 ` [PATCH v4 3/3] connect: advertized capability is not a ref Jonathan Tan
2016-09-09 19:40   ` Jonathan Nieder
2016-09-09 20:40     ` Junio C Hamano
2016-09-09 20:09   ` Junio C Hamano
2016-09-09 20:17 ` [PATCH v5 0/3] handle empty spec-compliant remote repos correctly Jonathan Tan
2016-09-09 21:07   ` Jonathan Nieder
2016-09-09 20:17 ` [PATCH v5 1/3] tests: move test_lazy_prereq JGIT to test-lib.sh Jonathan Tan
2016-09-09 20:17 ` [PATCH v5 2/3] connect: tighten check for unexpected early hang up Jonathan Tan
2016-09-09 20:17 ` [PATCH v5 3/3] connect: advertized capability is not a ref Jonathan Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160903005653.vzt3vel25vino7yk@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=jrnieder@gmail.com \
    --cc=sbeller@google.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).