git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH v2 3/8] Support taking over transports
Date: Sat, 5 Dec 2009 15:18:14 +0200	[thread overview]
Message-ID: <20091205131814.GC1684@Knoppix> (raw)
In-Reply-To: <20091204182753.GD1483@spearce.org>

On Fri, Dec 04, 2009 at 10:27:53AM -0800, Shawn O. Pearce wrote:
> Ilari Liusvaara <ilari.liusvaara@elisanet.fi> wrote:
> > Add support for taking over transports that turn out to be smart.
> 
> Why can't you expose git_take_over_transport as a public function
> and then the transport-helper.c code can instead do:
> 
> 	... setup connect with helper ...
> 	transport_takeover(transport, child);
> 	return transport->fetch(....);
> 
> Would this make the code simpler?

The code complexity difference is not big. The magic return was for
historic reasons that no longer apply (and didn't get fixed when
corresponding upstream changes happned).

Namely, the push/push_refs impedance mismatch. Helpers used push,
smart transports used push_refs. But now that both use push_refs,
the handler can be invoked directly from push_refs of helper.

Fixed.

-Ilari

  reply	other threads:[~2009-12-05 13:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 15:55 [RFC PATCH v2 0/8] Remote helpers smart transport extensions Ilari Liusvaara
2009-12-04 15:55 ` Ilari Liusvaara
2009-12-04 15:56 ` Ilari Liusvaara
2009-12-04 15:56 ` [RFC PATCH v2 1/8] Pass unknown protocols to external protocol handlers Ilari Liusvaara
2009-12-04 16:01   ` Sverre Rabbelier
2009-12-04 17:55   ` Shawn O. Pearce
2009-12-05 13:17     ` Ilari Liusvaara
2009-12-04 15:56 ` [RFC PATCH v2 2/8] Refactor git transport options parsing Ilari Liusvaara
2009-12-04 15:56 ` [RFC PATCH v2 3/8] Support taking over transports Ilari Liusvaara
2009-12-04 18:27   ` Shawn O. Pearce
2009-12-05 13:18     ` Ilari Liusvaara [this message]
2009-12-04 15:56 ` [RFC PATCH v2 4/8] Support remote helpers implementing smart transports Ilari Liusvaara
2009-12-04 18:37   ` Shawn O. Pearce
2009-12-05 13:16     ` Ilari Liusvaara
2009-12-04 15:56 ` [RFC PATCH v2 5/8] Support remote archive from external protocol helpers Ilari Liusvaara
2009-12-04 15:56 ` [RFC PATCH v2 6/8] Remove special casing of http, https and ftp Ilari Liusvaara
2009-12-04 16:05   ` Sverre Rabbelier
2009-12-04 15:56 ` [RFC PATCH v2 7/8] Add remote helper debug mode Ilari Liusvaara
2009-12-04 16:03   ` Sverre Rabbelier
2009-12-04 15:56 ` [RFC PATCH v2 8/8] Support mandatory capabilities Ilari Liusvaara

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=20091205131814.GC1684@Knoppix \
    --to=ilari.liusvaara@elisanet.fi \
    --cc=git@vger.kernel.org \
    --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.
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 NNTP newsgroup(s).