提交 40d05d04 编写于 作者: J Jeff King 提交者: Junio C Hamano

send-pack: improve unpack-status error messages

When the remote tells us that the "unpack" step failed, we
show an error message. However, unless you are familiar with
the internals of send-pack and receive-pack, it was not
clear that this represented an error on the remote side.
Let's re-word to make that more obvious.

Likewise, when we got an unexpected packet from the other
end, we complained with a vague message but did not actually
show the packet.  Let's fix that.

And finally, neither message was marked for translation. The
message from the remote probably won't be translated, but
there's no reason we can't do better for the local half.
Signed-off-by: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f7cd74d1
......@@ -134,9 +134,9 @@ static int receive_unpack_status(int in)
{
const char *line = packet_read_line(in, NULL);
if (!skip_prefix(line, "unpack ", &line))
return error("did not receive remote status");
return error(_("unable to parse remote unpack status: %s"), line);
if (strcmp(line, "ok"))
return error("unpack failed: %s", line);
return error(_("remote unpack failed: %s"), line);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册