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

Re: "Unexpected end of command stream" message looks irrelevant when I try to pull a non-existing branch

From
Jeff King <peff@peff.net>
Date
Jul 9, 2014, 20:59 UTC
Message-ID
<20140709205902.GB25854@sigill.intra.peff.net>
In-Reply-To
<787461404891471@web12h.yandex.ru>
On Wed, Jul 09, 2014 at 11:37:51AM +0400, Dmitry wrote:
Show 14 quoted lines
> I'm using Git 1.8.1 and when I run the following command:
> 
> git pull origin matser
> 
> I get the following output:
> 
> fatal: couldn't find remote ref matser
> Unexpected end of command stream
> 
> The first line in the output is right on the money but the second one
> looks completely irrelevant - the command is well formed except I
> perhaps mistyped the branch name. It looks like there's some bug that
> prevents the program from just exiting after printing the first line
> and so the second line is being output.

I imagine your origin remote is over http. For some protocols, git delegates the hard work to a helper program and communicates over a pipe. In this case, the parent git process detects a problem and dies. The second message comes from the helper, who is surprised that the parent has gone away.

Probably the right solution is teaching the parent to properly hang up the connection with the helper before exiting (alternatively, we could just silence the helper; that means we would get less output when the parent really does unexpectedly go away, but that isn't supposed to ever happen).

-Peff
Previous: DmitryNext: Jeff King
Message 2 of 8 in “"Unexpected end of command stream" message looks irrelevant when I try to pull a non-existing branch”
  1. DmitryJul 9, 2014
  2. Jeff KingJul 9, 2014
  3. remote-curl: do not complain on EOF from parent gitJeff King, Jul 9, 2014
  4. Keller, Jacob EJul 9, 2014
  5. Jeff KingJul 9, 2014
  6. 1/3 remote-curl: do not complain on EOF from parent gitJeff King, Jul 9, 2014
  7. 2/3 remote-curl: use error instead of fprintf(stderr)Jeff King, Jul 9, 2014
  8. 3/3 remote-curl: mark helper-protocol errors more clearlyJeff King, Jul 9, 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.