summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5615d2)
raw | patch | inline | side by side (parent: f5615d2)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 31 Oct 2009 00:47:22 +0000 (17:47 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 31 Oct 2009 02:20:53 +0000 (19:20 -0700) |
When there is an error parsing the 4 byte length component we now
display it as part of the die message, this may hint as to what
data was misunderstood by the application.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
display it as part of the die message, this may hint as to what
data was misunderstood by the application.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pkt-line.c | patch | blob | history |
diff --git a/pkt-line.c b/pkt-line.c
index bd603f8721704305c2ce4608a09df38ed4bc55a0..295ba2b16c8675d8c5c5d0a5ee6e61e044ce99dd 100644 (file)
--- a/pkt-line.c
+++ b/pkt-line.c
safe_read(fd, linelen, 4);
len = packet_length(linelen);
if (len < 0)
- die("protocol error: bad line length character");
+ die("protocol error: bad line length character: %.4s", linelen);
if (!len)
return 0;
len -= 4;