pack-protocol: fix maximum pkt-line size
authorLars Schneider <larsxschneider@gmail.com>
Mon, 29 Aug 2016 17:55:09 +0000 (19:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Aug 2016 18:00:29 +0000 (11:00 -0700)
According to LARGE_PACKET_MAX in pkt-line.h the maximal length of a
pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and
therefore the pkt-line data component must not exceed 65516 bytes.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/protocol-common.txt
index d30a1b9510c55403c94e7b9ecfe211df9b463832..d2a6b268cd32189ffd91038a1a09493e863f176d 100644 (file)
@@ -64,9 +64,9 @@ pkt-line parsing/formatting routines are 8-bit clean.
 A non-binary line SHOULD BE terminated by an LF, which if present
 MUST be included in the total length.
 
-The maximum length of a pkt-line's data component is 65520 bytes.
-Implementations MUST NOT send pkt-line whose length exceeds 65524
-(65520 bytes of payload + 4 bytes of length data).
+The maximum length of a pkt-line's data component is 65516 bytes.
+Implementations MUST NOT send pkt-line whose length exceeds 65520
+(65516 bytes of payload + 4 bytes of length data).
 
 Implementations SHOULD NOT send an empty pkt-line ("0004").