From: "Shawn O. Pearce" <spearce@spearce.org>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/8] Pass unknown protocols to external protocol handlers
Date: Fri, 4 Dec 2009 09:55:45 -0800 [thread overview]
Message-ID: <20091204175545.GC1483@spearce.org> (raw)
In-Reply-To: <1259942168-24869-4-git-send-email-ilari.liusvaara@elisanet.fi>
Ilari Liusvaara <ilari.liusvaara@elisanet.fi> wrote:
> Change URL handling to allow external protocol handlers to implement
> new protocols without the '::' syntax if helper name does not conflict
> with any built-in protocol.
>
> foo:// now invokes git-remote-foo with foo:// URL.
...
Uh, great, but...
> @@ -30,6 +50,7 @@ static struct child_process *get_helper(struct transport *transport)
> const char **refspecs = NULL;
> int refspec_nr = 0;
> int refspec_alloc = 0;
> + int duped;
>
> if (data->helper)
> return data->helper;
...
> + /* Open the output as FILE* so strbuf_getline() can be used.
> + Do this with duped fd because fclose() will close the fd,
> + and stuff like disowning will require the fd to remain.
> +
> + Set the stream to unbuffered because some reads are critical
> + in sense that any overreading will cause deadlocks.
> + */
> + if((duped = dup(helper->out)) < 0)
> + die_errno("Can't dup helper output fd");
> + data->out = xfdopen(duped, "r");
> + setvbuf(data->out, NULL, _IONBF, 0);
> +
This is an entirely unrelated change. Please split it into its
own commit so its easier to review, test, blah blah blah.
--
Shawn.
next prev parent reply other threads:[~2009-12-04 18:02 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 [this message]
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
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=20091204175545.GC1483@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.