git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: dwh@linuxprogrammer.org, git@vger.kernel.org
Subject: Re: pkt-line and LF terminated lines of data
Date: Thu, 29 Apr 2021 02:08:06 +0000	[thread overview]
Message-ID: <YIoVBmeGMheSi897@camp.crustytoothpaste.net> (raw)
In-Reply-To: <87bl9yylyg.fsf@evledraar.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2021-04-29  2:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 22:22 pkt-line and LF terminated lines of data dwh
2021-04-29  0:12 ` Ævar Arnfjörð Bjarmason
2021-04-29  2:08   ` brian m. carlson [this message]
2021-04-29  3:16 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YIoVBmeGMheSi897@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=avarab@gmail.com \
    --cc=dwh@linuxprogrammer.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).