git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-remote-fd problem

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Sep 10, 2014, 14:47 UTC
Message-ID
<20140910144756.GA4267@LK-Perkele-VII>
In-Reply-To
<CAOP4-939uAP2Tgofz01F40_Eb0F8GxBsU49HxNvAiyBCW6H08w@mail.gmail.com>
On Wed, Sep 10, 2014 at 03:29:00PM +0200, Jiri Sevcik wrote:
Show 13 quoted lines
> Hi!
> I have problem with using git-remote-fd function. I create two local
> pipes for communication for locally running process git pull. Then I
> start git-upload-pack on remote side (this process is started in
> different part of my code  and it works correctly). Communication runs
> successfully and when remote side finish, I want to close local pipes
> to finish local process. I call close function to all of these pipes,
> but unfortunatelly local process doesnt finish (in this moment
> transfered data aresaved in /.git/object/pack folder in .pack files)
> and hanging on. But if I kill child of this local process, downloaded
> files are unpacked and files are created sucessfully. I think this way
> is not so correct. Can someone help me and tell me what am I doing
> wrong? Thank You. Code is in an attachement (its part of big system).

The remote-fd expects the transport to pass half-closes. So you can't close all at once.

Let there be pipes W and R and transport connection C.
- W-read should be closed after being passed to remote-fd.
- R-write should be closed after being passed to remote-fd.
- Upon receiving "no more data" from C, close W-write.
- Upon receiving EOF from R-read, close it and signal "no more data"
  to C.

If you have server end, the same applies, but with remote-fd replaced by upload-pack/upload-archive/receive-pack.

-Ilari
Previous: Jiri SevcikNext: Jiri Sevcik
Message 2 of 4 in “git-remote-fd problem”
  1. Jiri SevcikSep 10, 2014
  2. Ilari LiusvaaraSep 10, 2014
  3. Fwd: git-remote-fd problemJiri Sevcik, Dec 29, 2014
  4. Ilari LiusvaaraDec 29, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.