On 2021-04-29 at 00:12:00, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Apr 28 2021, dwh@linuxprogrammer.org wrote: > > > I was just reading the Documentation/technical/protocol-common.txt > > description of the pkt-line format. One detail that is left out is how a > > receiver of pkt-line encoded data determines if a line is binary data or > > contains non-binary data. > > They don't. The "is it binary" is a client convention / awareness of the > consumed payload. As a general rule of thumb, if the pkt-line is a pack or object, it's binary, and otherwise (a ref advertisement, a negotiation, etc.) it's text. Almost any case where GIT_TRACE_PACKET prints the output is going to be text, and almost any case where it does not is going to be binary. Note that whether something is text or binary is specifically an attribute of what part of the protocol is being parsed, not what bytes it contains. For example, a ref advertisement with a ref containing the bytes FE and FF is text, despite those not appearing in UTF-8. -- brian m. carlson (he/him or they/them) Houston, Texas, US