Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.
- From
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
- Date
- Jul 30, 2012, 13:55 UTC
- Message-ID
- <19477122.a5lMBqWgns@flomedio>
- In-Reply-To
- <20120730082951.GA7702@burratino>
On Monday 30 July 2012 03:29:52 Jonathan Nieder wrote:
Show 23 quoted lines
> > 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?