git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: David Turner <dturner@twopensource.com>
Cc: Jeff King <peff@peff.net>, Shawn Pearce <spearce@spearce.org>,
	Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions
Date: Fri, 29 Apr 2016 16:12:01 -0700	[thread overview]
Message-ID: <CAGZ79kYy0TxmUAr-QdAw-KNqD0DyxfvdjB6Jkgg3bzRDTGWdrA@mail.gmail.com> (raw)
In-Reply-To: <1461971144.4123.38.camel@twopensource.com>

On Fri, Apr 29, 2016 at 4:05 PM, David Turner <dturner@twopensource.com> wrote:
> On Tue, 2016-04-26 at 20:59 -0700, Stefan Beller wrote:
>> On Mon, Apr 25, 2016 at 3:10 PM, Stefan Beller <sbeller@google.com>
>> wrote:
>> > On Mon, Apr 25, 2016 at 9:44 AM, David Turner <
>> > dturner@twopensource.com> wrote:
>> > > On Wed, 2016-04-20 at 16:57 -0400, Jeff King wrote:
>> > > > On Wed, Apr 20, 2016 at 04:46:55PM -0400, David Turner wrote:
>> > > >
>> > > > > As you note, it appears that git-daemon does sort-of have
>> > > > > support
>> > > > > for
>> > > > > extra args -- see parse_host_arg.  So it wouldn't be hard to
>> > > > > add
>> > > > > something here. Unfortunately, current versions of git die on
>> > > > > unknown
>> > > > > args.  So this change would not be backwards-compatible.  We
>> > > > > could
>> > > > > put
>> > > > > a decider on it so that clients would only try it when
>> > > > > explicitly
>> > > > > enabled.  Or we could have clients try it with, and in the
>> > > > > event of
>> > > > > an
>> > > > > error, retry without.  Neither is ideal, but both are
>> > > > > possible.
>> > > >
>> > > > Right. This ends up being the same difficulty that the v2
>> > > > protocol
>> > > > encountered; how do you figure out what you can speak without
>> > > > resorting
>> > > > to expensive fallbacks, when do you flip the switch, do you
>> > > > remember
>> > > > the
>> > > > protocol you used last time with this server, etc.
>> > >
>> > > Right.
>> > >
>> > > [moved]
>> > > > > If I read this code correctly, git-over-ssh will pass through
>> > > > > arbitrary
>> > > > > arguments.  So this should be trivial.
>> > > >
>> > > > It does if you are ssh-ing to a real shell-level account on the
>> > > > server,
>> > > > but if you are using git-shell or some other wrapper to
>> > > > restrict
>> > > > clients
>> > > > from running arbitrary commands, it will likely reject it.
>> > >
>> > > Oh, I see how I was mis-reading shell.c.  Oops.
>> > > [/moved]
>> > >
>> > >
>> > > > Which isn't to say it's necessarily a bad thing. Maybe the path
>> > > > forward
>> > > > instead of v2 is to shoe-horn this data into the pre-protocol
>> > > > conversation, and go from there. The protocol accepts that
>> > > > "somehow"
>> > > > it
>> > > > got some extra data from the transport layer, and acts on its
>> > > > uniformly.
>> > >
>> > > OK, so it seems like only HTTP (and non-git-shell-git://) allow
>> > > backwar
>> > > ds-compatible optional pre-protocol messages.  So we don't have
>> > > good
>> > > options; we only have bad ones.  We have to decide which
>> > > particular
>> > > kind of badness we're willing to accept, and to what degree we
>> > > care
>> > > about extensibility.  As I see it, the badness options are (in no
>> > > particular order):
>> > >
>> > > 1. Nothing changes.
>> > > 2. HTTP grows more extensions; other protocols stagnate.
>> > > 3. HTTP grows extensions; other protocols get extensions but:
>> > >    a. only use them on explicit client configuration or
>> > >    b. try/fail/remember per-remote
>> > > 4. A backwards-incompatible protocol v2 is introduced, which
>> > >    hits alternate endpoints (with the same a/b as above).  This
>> > > is
>> > >    different from 3. in that protocol v2 is explicitly designed
>> > > around
>> > >    a capabilities negotiation phase rather than unilateral client
>> > > -side
>> > >    decisions.
>> > > 5. Think of another way to make fetch performant with many refs,
>> > > and
>> > >     defer the extension decision.
>> >
>> > I'd prefer 2,3,4 over 1,5.
>> >
>> > Speaking about 2,3,4:
>> >
>> > Maybe we can do a mix of 2 and 4:
>> >
>> >    1) HTTP grows more extensions; other protocols stagnate for now.
>> >    2) Come up with a backwards-incompatible protocol v2, foccussed
>> > on
>> >        capabilities negotiation phase, hitting alternative end
>> > points
>> >        (non http only, or rather a subset of protocols only)
>> >     3) if HTTP sees the benefits of the native protocol v2, we may
>> > switch
>> >         HTTP, too
>> >
>> > (in time order of execution. Each point is decoupled from the
>> > others and may
>> > be done by different people at different times.)
>> >
>>
>> Today I rebased protocol-v2[1] and it was fewer conflicts than
>> expected.
>> I am surprised by myself that there is even a test case for v2
>> already,
>> so I think it is more progressed that I had in mind. Maybe we can do
>> 1)
>> for now and hope that the non http catches up eventually?
>>
>>
>> [1] https://github.com/stefanbeller/git/tree/protocol-v2
>
>
> Do you plan to send these patches to the mailing list?  What's the next
> step here?

I can send them out if you want to. As I flip flop between
"they are perfect" and "they are horrible, nobody should see them",
I haven't done it so far (also time constraints).

Will send them later today, in case it's urgent you can fetch them from
my github account.

What's the next step?
I don't know. I guess we can either collaborate on a large
series (do-it-all) or rather work on many smaller series'
that solve it partially one by one.

I'll send the patches out later today.

Thanks,
Stefan

  reply	other threads:[~2016-04-29 23:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 19:19 [PATCH/RFC 0/6] fetch with refspec David Turner
2016-04-15 19:19 ` [PATCH/RFC 1/6] http-backend: use argv_array functions David Turner
2016-04-18 18:34   ` Junio C Hamano
2016-04-19 19:11     ` David Turner
2016-04-15 19:19 ` [PATCH/RFC 2/6] remote-curl.c: fix variable shadowing David Turner
2016-04-18 18:35   ` Junio C Hamano
2016-04-19 19:14     ` David Turner
2016-04-15 19:19 ` [PATCH/RFC 3/6] http-backend: handle refspec argument David Turner
2016-04-17  1:51   ` Eric Sunshine
2016-04-19 18:57     ` David Turner
2016-04-15 19:19 ` [PATCH/RFC 4/6] transport: add refspec list parameters to functions David Turner
2016-04-18 18:45   ` Junio C Hamano
2016-04-19  7:14     ` Jeff King
2016-04-19 18:04       ` Stefan Beller
2016-04-19 20:55       ` Junio C Hamano
2016-04-19 21:40       ` David Turner
2016-04-19 23:22         ` Jeff King
2016-04-19 23:43           ` David Turner
2016-04-20  1:17             ` Jeff King
2016-04-20 20:46               ` David Turner
2016-04-20 20:57                 ` Jeff King
2016-04-25 16:44                   ` David Turner
2016-04-25 22:10                     ` Stefan Beller
2016-04-27  3:59                       ` Stefan Beller
2016-04-27  4:11                         ` Jeff King
2016-04-27 15:07                           ` Junio C Hamano
2016-04-29 23:05                         ` David Turner
2016-04-29 23:12                           ` Stefan Beller [this message]
2016-04-19 19:31     ` David Turner
2016-04-15 19:19 ` [PATCH/RFC 5/6] fetch: pass refspec to http server David Turner
2016-04-17  2:33   ` Eric Sunshine
2016-04-19 21:25     ` David Turner
2016-04-15 19:19 ` [PATCH/RFC 6/6] clone: send refspec for single-branch clones David Turner
2016-04-17  2:36   ` Eric Sunshine
2016-04-19 21:24     ` David Turner
2016-04-15 19:30 ` [PATCH/RFC 0/6] fetch with refspec Stefan Beller

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=CAGZ79kYy0TxmUAr-QdAw-KNqD0DyxfvdjB6Jkgg3bzRDTGWdrA@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --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).