Re: Meaning of "fatal: protocol error: bad line length character"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Lear <rael@xxxxxxxxxx> writes:

> He has an active update hook in his public repo, to send notices to
> his collaborators when his work is ready for them to pull, but we
> looked through it and don't see any printing to stdout.

Just a hunch.

Does the bash start-up sequence for the user emit something to
stdout?

The attached patch on the local side (i.e. the one that pushes)
dumps "garbage" you are getting on the line from the remote
side, to help diagnosing the problem.


diff --git a/pkt-line.c b/pkt-line.c
index b4cb7e2..9bb1c90 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -101,6 +101,16 @@ int packet_read_line(int fd, char *buffer, unsigned size)
 			len += c - 'A' + 10;
 			continue;
 		}
+		error("protocol error: bad line length character");
+		fprintf(stderr, "<<<<<\n%.*s", 4, linelen);
+		while (1) {
+			char buf[1024];
+			int cnt = xread(fd, buf, sizeof(buf));
+			if (cnt <= 0)
+				break;
+			fprintf(stderr, "%.*s", cnt, buf);
+		}
+		fprintf(stderr, "\n>>>>>\n");
 		die("protocol error: bad line length character");
 	}
 	if (!len)



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]