From 1396c381782f446ae5ea177b0f5c407f90197c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 18 May 2015 16:04:55 +0200 Subject: errors: add GIT_EEOF to indicate early EOF This can be used by tools to show mesages about failing to communicate with the server. The error message in this case will often contain the server's error message, as far as it managed to send anything. --- src/transports/smart_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/transports/smart_protocol.c') 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; } -- cgit v1.2.1