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

2014-07-09 Thread Dmitry
Hi,

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.

Could you please fix this?

Thank you.
Dmitry.
--
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 11:37:51AM +0400, Dmitry wrote:

 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
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html