Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-02 Thread Felipe Contreras
On Mon, Apr 1, 2013 at 11:19 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Mon, Apr 1, 2013 at 11:01 PM, Jeff King p...@peff.net wrote: On Mon, Apr 01, 2013 at 10:51:20PM -0600, Felipe Contreras wrote: So in fetch_with_import, we have a remote-helper, and we have a bidirectional

[PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Felipe Contreras
Otherwise transport-helper will continue checking for refs and other things what will confuse the user more. --- git-remote-testgit| 11 +++ t/t5801-remote-helpers.sh | 19 +++ transport-helper.c| 8 3 files changed, 38 insertions(+) diff --git

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Jeff King
On Mon, Apr 01, 2013 at 03:46:42PM -0600, Felipe Contreras wrote: Otherwise transport-helper will continue checking for refs and other things what will confuse the user more. [...] diff --git a/transport-helper.c b/transport-helper.c index cb3ef7d..dfdfa7a 100644 --- a/transport-helper.c

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Felipe Contreras
On Mon, Apr 1, 2013 at 5:33 PM, Jeff King p...@peff.net wrote: On Mon, Apr 01, 2013 at 03:46:42PM -0600, Felipe Contreras wrote: Otherwise transport-helper will continue checking for refs and other things what will confuse the user more. [...] diff --git a/transport-helper.c

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Otherwise transport-helper will continue checking for refs and other things what will confuse the user more. --- Sign-off? git-remote-testgit| 11 +++ t/t5801-remote-helpers.sh | 19 +++

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Jeff King
On Mon, Apr 01, 2013 at 06:12:45PM -0600, Felipe Contreras wrote: Checking asynchronously for death like this is subject to a rac condition; the helper may be about to die but not have died yet. In practice we may catch some cases, but this seems like an indication that the protocol is

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Felipe Contreras
On Mon, Apr 1, 2013 at 8:30 PM, Jeff King p...@peff.net wrote: On Mon, Apr 01, 2013 at 06:12:45PM -0600, Felipe Contreras wrote: Checking asynchronously for death like this is subject to a rac condition; the helper may be about to die but not have died yet. In practice we may catch some

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Felipe Contreras
On Mon, Apr 1, 2013 at 6:26 PM, Junio C Hamano gits...@pobox.com wrote: OK, so the idea is that fetch_with_import() does - get_helper(transport), which spawns a helper process; - get_importer(transport, fastimport), which spawns a fast-import and make it read from the output of the

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Jeff King
On Mon, Apr 01, 2013 at 10:51:20PM -0600, Felipe Contreras wrote: So in fetch_with_import, we have a remote-helper, and we have a bidirectional pipe to it. We then call get_importer, which starts fast-import, whose stdin is connected to the stdout of the remote helper. We tell the

Re: [PATCH 2/4] transport-helper: check if remote helper is alive

2013-04-01 Thread Felipe Contreras
On Mon, Apr 1, 2013 at 11:01 PM, Jeff King p...@peff.net wrote: On Mon, Apr 01, 2013 at 10:51:20PM -0600, Felipe Contreras wrote: So in fetch_with_import, we have a remote-helper, and we have a bidirectional pipe to it. We then call get_importer, which starts fast-import, whose stdin is