summaryrefslogtreecommitdiff
path: root/src/transports
diff options
context:
space:
mode:
Diffstat (limited to 'src/transports')
-rw-r--r--src/transports/smart_protocol.c4
-rw-r--r--src/transports/ssh.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c
index 66f78f73c..0920f2eef 100644
--- a/src/transports/smart_protocol.c
+++ b/src/transports/smart_protocol.c
@@ -52,7 +52,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
if (recvd == 0 && !flush) {
giterr_set(GITERR_NET, "early EOF");
- return -1;
+ return GIT_EEOF;
}
continue;
@@ -770,7 +770,7 @@ static int parse_report(transport_smart *transport, git_push *push)
if (recvd == 0) {
giterr_set(GITERR_NET, "early EOF");
- return -1;
+ return GIT_EEOF;
}
continue;
}
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 0d179e715..55f715b1d 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -129,10 +129,14 @@ static int ssh_stream_read(
return -1;
}
- /* Having something in stderr is typically a not-found error */
+ /*
+ * If we can't get anything out of stdout, it's typically a
+ * not-found error, so read from stderr and signal EOF on
+ * stderr.
+ */
if (rc == 0 && (rc = libssh2_channel_read_stderr(s->channel, buffer, buf_size)) > 0) {
giterr_set(GITERR_SSH, "%*s", rc, buffer);
- return -1;
+ return GIT_EEOF;
}