Skip to content

Commit 40d05d0

Browse files
peffgitster
authored andcommitted
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: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f7cd74d commit 40d05d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

send-pack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ static int receive_unpack_status(int in)
134134
{
135135
const char *line = packet_read_line(in, NULL);
136136
if (!skip_prefix(line, "unpack ", &line))
137-
return error("did not receive remote status");
137+
return error(_("unable to parse remote unpack status: %s"), line);
138138
if (strcmp(line, "ok"))
139-
return error("unpack failed: %s", line);
139+
return error(_("remote unpack failed: %s"), line);
140140
return 0;
141141
}
142142

0 commit comments

Comments
 (0)