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

Re: [PATCH 4/4] upload-pack/fetch-pack: support side-band communication

From
Junio C Hamano <junkio@cox.net>
Date
Jun 22, 2006, 00:17 UTC
Message-ID
<7vpsh2xcv1.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vsllyzs9w.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 14 quoted lines
> This implements a protocol extension between fetch-pack and
> upload-pack to allow stderr stream from upload-pack (primarily
> used for the progress bar display) to be passed back.
>
> Signed-off-by: Junio C Hamano <junkio@cox.net>
> ---
>
>  * With this, fetching and cloning over git+ssh:// and git://
>    does not discard the progress bar and error messages that
>    upload-pack emits on its standard output.  They are sent to
>    the downloader and shown to the user.
>
>    Somehow this does not work when connecting to git daemon that
>    runs under inetd.  Fixes appreciated.
This seems to fix it.
-- >8 --
Subject: [PATCH] daemon: send stderr to /dev/null instead of closing.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 daemon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon.c b/daemon.c
index bdfe80d..0747ce2 100644
--- a/daemon.c
+++ b/daemon.c
@@ -757,7 +757,7 @@ int main(int argc, char **argv)
 		struct sockaddr *peer = (struct sockaddr *)&ss;
 		socklen_t slen = sizeof(ss);
 
-		fclose(stderr); //FIXME: workaround
+		freopen("/dev/null", "w", stderr);
 
 		if (getpeername(0, peer, &slen))
 			peer = NULL;
-- 
1.4.0.g7883
Previous: Junio C HamanoNext: Jon Loeliger
Message 2 of 3 in “upload-pack/fetch-pack: support side-band communication”
  1. 4/4 upload-pack/fetch-pack: support side-band communicationJunio C Hamano, Jun 21, 2006
  2. Junio C HamanoJun 22, 2006
  3. Jon LoeligerJun 22, 2006

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.