All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Borowitz <dborowitz@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Shawn Pearce <spearce@spearce.org>, git <git@vger.kernel.org>
Subject: Re: [PATCH 3/7] pack-protocol.txt: Mark all LFs in push-cert as required
Date: Mon, 6 Jul 2015 14:08:21 -0400	[thread overview]
Message-ID: <CAD0k6qQH1t2QzjQydjqzse+caib4Z+yCtJd9eDy=hBukxLKMhQ@mail.gmail.com> (raw)
In-Reply-To: <xmqq7fqd17qn.fsf@gitster.dls.corp.google.com>

On Mon, Jul 6, 2015 at 2:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Dave Borowitz <dborowitz@google.com> writes:
>
>> On Mon, Jul 6, 2015 at 1:34 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Dave Borowitz <dborowitz@google.com> writes:
>>>
>>>> Another way of looking at the problem with my assumptions is, I was
>>>> assuming "pkt-line framing" was the same thing as "pkt-line header".
>>>> You seem to be saying the definition of "pkt-line framing" is "header,
>>>> and optional trailing newline".
>>>
>>> Yes.  I thought that was what "Server SHOULD terminate with LF;
>>> client MUST NOT require it" in the existing text meant.
>>
>> Unfortunately, the existing text is littered with examples of
>> "PKT-LINE(foo SP bar LF)". If we assume "PKT-LINE(...)" means "apply
>> pkt-line framing to the [...]", then this strongly implies that
>> "pkt-line framing" does _not_ include the trailing LF. (Or the logical
>> but bizarre alternative reading that such an example might have _two_
>> trailing LFs :)
>
> Yes,  But I never viewed PKT-LINE() as an element that strictly
> defines the grammar of the packet protocol ;-)
>
> By clarifying that "sender SHOULD terminate with LF, receiver MUST
> NOT require it" is the rule (and fixing the existing implementations
> at places where they violate the "MUST NOT" part, which I think are
> very small number of places), I think we can drop these LF (or LF?
> for that matter) from all of the PKT-LINE() in the construction in
> the pack-protocol.txt, which would be a very good thing to do.

Completely agree, and that is what I meant when I said "The additional
upside [to explicitly defining pkt-line framing in this way] is that
we could then potentially remove all or almost all LFs from this
document."

> The example in your sentence will become PKT-LINE(foo SP bar) and
> the "there may be an LF at the end" would only be at one place, as a
> part of the definition of PKT-LINE().

  reply	other threads:[~2015-07-06 18:09 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 18:08 [PATCH 0/7] Clarify signed push protocol documentation Dave Borowitz
2015-07-01 18:08 ` [PATCH 1/7] pack-protocol.txt: Add warning about protocol inaccuracies Dave Borowitz
2015-07-01 19:39   ` Jonathan Nieder
2015-07-01 19:52     ` Junio C Hamano
2015-07-01 19:56     ` Dave Borowitz
2015-07-01 18:08 ` [PATCH 2/7] pack-protocol.txt: Mark LF in command-list as optional Dave Borowitz
2015-07-01 18:21   ` Stefan Beller
2015-07-01 18:46     ` Dave Borowitz
2015-07-01 18:08 ` [PATCH 3/7] pack-protocol.txt: Mark all LFs in push-cert as required Dave Borowitz
2015-07-01 20:00   ` Junio C Hamano
2015-07-01 20:07     ` Dave Borowitz
2015-07-01 20:49       ` Junio C Hamano
2015-07-06 14:46         ` Dave Borowitz
2015-07-06 15:22           ` Dave Borowitz
2015-07-06 15:27             ` Dave Borowitz
2015-07-06 15:29               ` Dave Borowitz
2015-07-06 15:35             ` Dave Borowitz
2015-07-06 16:12             ` Junio C Hamano
2015-07-06 15:46         ` Shawn Pearce
2015-07-06 16:28           ` Junio C Hamano
2015-07-06 16:28           ` Junio C Hamano
2015-07-06 16:38             ` Dave Borowitz
2015-07-06 16:57               ` Junio C Hamano
2015-07-06 17:11                 ` Dave Borowitz
2015-07-06 17:18                   ` Dave Borowitz
2015-07-06 17:34                     ` Junio C Hamano
2015-07-06 17:38                       ` Dave Borowitz
2015-07-06 18:06                         ` Junio C Hamano
2015-07-06 18:08                           ` Dave Borowitz [this message]
2015-07-06 18:23                           ` Junio C Hamano
2015-07-06 17:30                   ` Junio C Hamano
2015-07-06 17:35                     ` Dave Borowitz
2015-07-06 17:59                       ` Junio C Hamano
2015-07-01 20:36     ` Junio C Hamano
2015-07-01 20:39       ` Junio C Hamano
2015-07-02 13:53         ` Jeff King
2015-07-03 17:45           ` Junio C Hamano
2015-07-03 18:07             ` Jeff King
2015-07-03 18:43               ` Shawn Pearce
2015-07-03 18:46                 ` Jeff King
2015-07-01 18:08 ` [PATCH 4/7] pack-protocol.txt: Elaborate on pusher identity Dave Borowitz
2015-07-01 18:58   ` Junio C Hamano
2015-07-01 18:08 ` [PATCH 5/7] pack-protocol.txt: Be more precise about pusher-key relationship Dave Borowitz
2015-07-01 18:08 ` [PATCH 6/7] pack-protocol.txt: Mark pushee field as optional Dave Borowitz
2015-07-01 18:56   ` Junio C Hamano
2015-07-01 19:06     ` Dave Borowitz
2015-07-01 19:07     ` Junio C Hamano
2015-07-01 19:08       ` Junio C Hamano
2015-07-01 19:31       ` Dave Borowitz
2015-07-01 18:08 ` [PATCH 7/7] send-pack.c: Die if the nonce is empty Dave Borowitz

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

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

  git send-email \
    --in-reply-to='CAD0k6qQH1t2QzjQydjqzse+caib4Z+yCtJd9eDy=hBukxLKMhQ@mail.gmail.com' \
    --to=dborowitz@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.