git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pack-protocol: document newline behavior in push commands

From
Jeff King <peff@peff.net>
Date
Sep 4, 2015, 09:00 UTC
Message-ID
<20150904090044.GB32751@sigill.intra.peff.net>
In-Reply-To
<xmqq4mjbi1w1.fsf@gitster.mtv.corp.google.com>
On Thu, Sep 03, 2015 at 03:17:18PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Frankly, this feels a bit like a step backwards to me. I am tempted to
> > suggest instead that git start sending the newlines, but I'm not sure
> > it's worth any potential fallout.
> 
> I actually think we should do both in the longer term.
> 
> If we say sender "SHOULD" and we know no existing receiver violates
> the "MUST NOT reject", our sender should follow that "SHOULD".

Right, it was the second "we know..." that made me worry. It is really "we assume". :) Whether it is right according to the spec or not, the real world is sometimes more complicated. And given that there is no real advantage to changing the sending behavior now, I didn't think it worth doing.

Show 5 quoted lines
> This documentation update is good in that it makes the examples
> easier to read (by the way, the first pre-context line ends with
> '\n', which we would eventually also address) by making the reader
> understand that the convention used in this S:/C: exchange
> illustration the optional LF is not shown.

In the second patch I left them all intact, but I agree that we could drop the "\n" entirely from the example conversations, as it is implied (and GIT_PACKET_TRACE, for example, does not even show it).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “pack-protocol: document newline behavior in push commands”
  1. pack-protocol: document newline behavior in push commandsJeff King, Sep 3, 2015
  2. pack-protocol: clarify LF-handling in PKT-LINE()Jeff King, Sep 3, 2015
  3. Jeff KingSep 3, 2015
  4. Junio C HamanoSep 3, 2015
  5. Junio C HamanoSep 3, 2015
  6. Jeff KingSep 4, 2015
  7. Junio C HamanoSep 4, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.