Explicitly capture the stderr from a failed SSH fetch or push
commitf351215448c30af734aed7a81b496f16e94769b7
authorShawn O. Pearce <spearce@spearce.org>
Thu, 10 Jul 2008 06:13:23 +0000 (10 02:13 -0400)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 11 Jul 2008 10:14:32 +0000 (11 12:14 +0200)
tree14786d8645bc6065ce8d44ed7e9914ae32461b63
parent5a3579627a5f32da450f3f6e5c68db8e18243f0b
Explicitly capture the stderr from a failed SSH fetch or push

If the remote command name is not found on the remote system we are
likely to get a shell error sent to the channel's stderr stream,
and yet the channel is connected.  So we don't see the problem
until we try to read the advertised refs, which is somewhat late.

If we get EOF before the first advertised ref it is a very good
indication that the remote side did not start the process we wanted
it to.  Tossing a specialized exception allows the SSH transport
to offer up the contents of the stderr channel (if any) as possible
indication of why the repository does not exist.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.egit.ui/src/org/spearce/egit/ui/EclipseSshSessionFactory.java
org.spearce.jgit/src/org/spearce/jgit/errors/NoRemoteRepositoryException.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/DefaultSshSessionFactory.java
org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitSsh.java