login
Header Space

 
 

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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bill Lear <rael@...>
Cc: <git@...>
Date: Monday, January 22, 2007 - 3:45 pm

Bill Lear <rael@zopyra.com> writes:


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Meaning of "fatal: protocol error: bad line length chara..., Junio C Hamano, (Mon Jan 22, 3:45 pm)
speck-geostationary