mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
transport: provide clearer / unique error messages
Provide more user-friendly error messages in smart protocol negotiation failures.
This commit is contained in:
@@ -59,7 +59,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
|
||||
return recvd;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ static int recv_pkt(
|
||||
if ((ret = git_smart__recv(t)) < 0) {
|
||||
return ret;
|
||||
} 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;
|
||||
}
|
||||
} while (error);
|
||||
@@ -940,7 +940,7 @@ static int parse_report(transport_smart *transport, git_push *push)
|
||||
}
|
||||
|
||||
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;
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user