Commit bc124bb4 by Edward Thomson

transport: provide clearer / unique error messages

Provide more user-friendly error messages in smart protocol negotiation
failures.
parent 18474f7d
...@@ -59,7 +59,7 @@ int git_smart__store_refs(transport_smart *t, int flushes) ...@@ -59,7 +59,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
return recvd; return recvd;
if (recvd == 0) { if (recvd == 0) {
git_error_set(GIT_ERROR_NET, "early EOF receiving refs"); git_error_set(GIT_ERROR_NET, "could not read refs from remote repository");
return GIT_EEOF; return GIT_EEOF;
} }
...@@ -285,7 +285,7 @@ static int recv_pkt( ...@@ -285,7 +285,7 @@ static int recv_pkt(
if ((ret = git_smart__recv(t)) < 0) { if ((ret = git_smart__recv(t)) < 0) {
return ret; return ret;
} else if (ret == 0) { } else if (ret == 0) {
git_error_set(GIT_ERROR_NET, "early EOF receiving packet"); git_error_set(GIT_ERROR_NET, "could not read from remote repository");
return GIT_EEOF; return GIT_EEOF;
} }
} while (error); } while (error);
...@@ -940,7 +940,7 @@ static int parse_report(transport_smart *transport, git_push *push) ...@@ -940,7 +940,7 @@ static int parse_report(transport_smart *transport, git_push *push)
} }
if (recvd == 0) { if (recvd == 0) {
git_error_set(GIT_ERROR_NET, "early EOF receiving report"); git_error_set(GIT_ERROR_NET, "could not read report from remote repository");
error = GIT_EEOF; error = GIT_EEOF;
goto done; goto done;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment