Git development
 help / color / mirror / Atom feed
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Dave Borowitz <dborowitz@google.com>
Cc: git <git@vger.kernel.org>, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Thoughts on refactoring the transport (+helper) code
Date: Thu, 13 Aug 2015 19:45:56 +0300	[thread overview]
Message-ID: <20150813164556.GA18951@LK-Perkele-VII> (raw)
In-Reply-To: <CAD0k6qR5AgtaDX3HuE1NVHnxsrAnYFnV1TYHWJsCJoD22ABb1g@mail.gmail.com>

On Thu, Aug 13, 2015 at 11:42:50AM -0400, Dave Borowitz wrote:
> 
> In my ideal world:
> -smart_options would never be NULL, and would instead be called
> "options" with a "smart" bit which is unset for dumb protocols.
> -Command line option processing code in {fetch,clone,push}.c would set
> fields in options (formerly known as smart_options) rather than
> passing around string constants.
> -TRANS_OPT_* string constants would only be used for remote helper
> protocol option names, and no more hard-coding these names.
> -The flags arg to the push* callbacks would go away, and callbacks
> would respect options instead.
> -The helper code would not send options immediately, but instead send
> just the relevant options immediately before a particular command
> requires them. Hopefully we could then eliminate the set_option
> callback entirely. (Two things I ran into that complicated this: 1)
> backfill_tags mutates just a couple of options before reusing the
> transport, and 2) the handling of push_cas_option is very
> special-cased.)

AFAIK, here are what one can encounter with remote helpers:

Some remote helpers are always smart, some are always dumb, and some
may be smart or dumb, depending on the URL.

I don't know how useful the last one is (smart or dumb depending on
URL) is. I have never seen such remote helper (HTTP doesn't count,
from Git PoV it is always dumb).

All smart helpers take common options associated with git smart
transport (e.g. thin, follow tags, push certs, etc..).

Dumb transports may take some of these kind of of options (esp.
smart HTTP), but it is highly dependent on the helper.

Then transports can have connection-level options (e.g. HTTPS
cert options). These can be present regardless of wheither
transport is smart or dumb.

The receive-pack / send-pack paths fall into connection-level
options, even if those are presently in smart transport common
options. Since those things make sense for some smart transports
(e.g. ssh://), but not others (e.g. git://).


-Ilari

  reply	other threads:[~2015-08-13 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 15:42 Thoughts on refactoring the transport (+helper) code Dave Borowitz
2015-08-13 16:45 ` Ilari Liusvaara [this message]
2015-08-13 16:50   ` Dave Borowitz

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

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

  git send-email \
    --in-reply-to=20150813164556.GA18951@LK-Perkele-VII \
    --to=ilari.liusvaara@elisanet.fi \
    --cc=dborowitz@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox