Thread (50 messages) flat view 50 messages, 6 authors, 2016-06-15

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

From: Florian Achleitner <hidden>
Date: 2016-06-15 22:54:22

On Monday 30 July 2012 03:29:52 Jonathan Nieder wrote:
quoted
Generally I like your prefered solution.
I think there's one problem:
The pipe needs to be created before the fork, so that the fd can be
inherited. 
The relevant pipe already exists at that point: the remote helper's
stdin.

In other words, it could work like this (just like the existing demo
code, except adding a conditional based on the "capabilities"
response):

        0. transport-helper.c invokes the remote helper.  This requires
           a pipe used to send commands to the remote helper
           (helper->in) and a pipe used to receive responses from the
           remote helper (helper->out)

        1. transport-helper.c sends the "capabilities" command to decide
           what to do.  The remote helper replies that it would like
           some feedback from fast-import.

        2. transport-helper.c forks and execs git fast-import with input
           redirected from helper->out and the cat-blob fd redirected
           to helper->in
fast-import writes to the helpers stdin..
        3. transport-helper.c tells the remote helper to start the
           import
transport-helper writes commands to the helper's stdin.
        4. wait for fast-import to exit
Hm .. that would mean, that both fast-import and git (transport-helper) would 
write to the remote-helper's stdin, right?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help