From: "Shawn O. Pearce" <spearce@spearce.org>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH v3 6/8] Support remote helpers implementing smart transports
Date: Mon, 7 Dec 2009 10:11:48 -0800 [thread overview]
Message-ID: <20091207181148.GG17173@spearce.org> (raw)
In-Reply-To: <1260116931-16549-7-git-send-email-ilari.liusvaara@elisanet.fi>
Ilari Liusvaara <ilari.liusvaara@elisanet.fi> wrote:
> diff --git a/transport-helper.c b/transport-helper.c
> index 3d99fe1..e0254bc 100644
> --- a/transport-helper.c
> +++ b/transport-helper.c
> static int fetch(struct transport *transport,
> int nr_heads, struct ref **to_fetch)
> {
> struct helper_data *data = transport->data;
> int i, count;
>
> + if (process_connect(transport, 0)) {
> + transport_take_over(transport);
> + return transport->fetch(transport, nr_heads, to_fetch);
> + }
We should already be connected because of the prior call into
get_refs_list(). If I read your code correctly we'd try to open
a new connection right here, which makes no sense. But its also
possible for us to be in a different transport, so we do code with
the assumption that we didn't get invoked through get_refs_list()
first and therefore need to open the connection ourselves.
Also, given the above invocation pattern, I see no reason why you
need the disown virtual function on struct transport*. Just pass
the #@!**! struct child* into transport_take_over() from the 3
call sites here and get rid of that unnecessary indirection.
--
Shawn.
next prev parent reply other threads:[~2009-12-07 18:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 16:28 [RFC PATCH v3 0/8] Remote helpers smart transport extensions Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 1/8] Add remote helper debug mode Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 2/8] Support mandatory capabilities Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 3/8] Pass unknown protocols to external protocol handlers Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 4/8] Refactor git transport options parsing Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 5/8] Support taking over transports Ilari Liusvaara
2009-12-07 17:49 ` Shawn O. Pearce
2009-12-07 21:19 ` Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 6/8] Support remote helpers implementing smart transports Ilari Liusvaara
2009-12-07 18:11 ` Shawn O. Pearce [this message]
2009-12-07 20:35 ` Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 7/8] Support remote archive from external protocol helpers Ilari Liusvaara
2009-12-07 18:12 ` Shawn O. Pearce
2009-12-07 20:37 ` Ilari Liusvaara
2009-12-06 16:28 ` [RFC PATCH v3 8/8] Remove special casing of http, https and ftp Ilari Liusvaara
2009-12-07 7:36 ` [RFC PATCH v3 0/8] Remote helpers smart transport extensions Junio C Hamano
2009-12-07 12:06 ` Nanako Shiraishi
2009-12-07 12:57 ` Erik Faye-Lund
2009-12-07 15:44 ` Nicolas Pitre
2009-12-07 20:07 ` Junio C Hamano
2009-12-07 22:25 ` Nanako Shiraishi
2009-12-08 5:57 ` Jeff King
2009-12-08 6:29 ` Jeff King
2009-12-07 16:33 ` Ilari Liusvaara
2009-12-07 20:05 ` Junio C Hamano
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=20091207181148.GG17173@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=ilari.liusvaara@elisanet.fi \
/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).