From: Jeff King Date: Thu, 03 Sep 2015 08:26:57 GMT Subject: Re: [PATCH] pack-protocol: clarify LF-handling in PKT-LINE() Message-ID: <20150903082657.GB20786@sigill.intra.peff.net> In-Reply-To: <20150903082409.GA20786@sigill.intra.peff.net> On Thu, Sep 03, 2015 at 04:24:09AM -0400, Jeff King wrote: > diff --git a/Documentation/technical/protocol-common.txt b/Documentation/technical/protocol-common.txt > index 889985f..bf30167 100644 > --- a/Documentation/technical/protocol-common.txt > +++ b/Documentation/technical/protocol-common.txt > @@ -62,7 +62,10 @@ A pkt-line MAY contain binary data, so implementors MUST ensure > 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. > +MUST be included in the total length. Receivers MUST treat pkt-lines > +with non-binary data the same whether or not they contain the trailing > +LF (stripping the LF if present, and not complaining when it is > +missing). I noticed that this section leaves vague the question of "what is a binary pkt-line". All of the PKT-LINE calls I tweaked in the grammar are for non-binary instances. The only binary ones are described in the sideband discussion of the "Packfile data" section, and there we do not have a grammar. So I think the result is reasonably clear, but I have far too much intimate knowledge of git's protocol to be a good judge. -Peff