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

Re: [PATCH 1/3] pretty: support "mboxrd" output format

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2016, 02:03 UTC
Message-ID
<CAPc5daWJ1v8EU89UN2HPK8=U17vz4LiANA9FyCvH5as7Hb1bTQ@mail.gmail.com>
In-Reply-To
<CAPig+cQ7y7J02+PVtdJywGEudOGXsy1jgadvVwBg5creiUv6zA@mail.gmail.com>
On Fri, Jun 3, 2016 at 5:19 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 9 quoted lines
>
> My only minor reservation is that it your concise version is still
> subtle with regard to not taking 'linelen' into account. At first
> glance, it looks like a bug that it doesn't consider the logical
> end-of-line, and someone reading the code has to put in extra effort
> to convince himself that the code works as intended.
>
> For that reason, I have a bit of a preference for a version of
> is_mboxrd_from() which does take 'linelen' into account explicitly.

That certainly is true. You could check that the end result did not consume more than linelen after the single-liner computes its result, but I am not sure under what condition that check would trigger. Even though we may hold the entire e-mail file without NUL-terminating each line, we have a NUL-termination at the end of the file, no?

Previous: Eric SunshineNext: Eric Wong
Message 16 of 18 in “support mboxrd format”
  1. 0/3 support mboxrd formatEric Wong, May 30, 2016
  2. 1/3 pretty: support "mboxrd" output formatEric Wong, May 30, 2016
  3. Eric SunshineMay 31, 2016
  4. Eric WongMay 31, 2016
  5. Eric SunshineMay 31, 2016
  6. Eric WongMay 31, 2016
  7. Eric SunshineMay 31, 2016
  8. Eric SunshineMay 31, 2016
  9. Eric WongJun 2, 2016
  10. Eric SunshineJun 3, 2016
  11. Junio C HamanoJun 3, 2016
  12. Eric SunshineJun 3, 2016
  13. Junio C HamanoJun 3, 2016
  14. Eric SunshineJun 4, 2016
  15. Eric SunshineJun 4, 2016
  16. Junio C HamanoJun 4, 2016
  17. 2/3 mailsplit: support unescaping mboxrd messagesEric Wong, May 30, 2016
  18. 3/3 am: support --patch-format=mboxrdEric Wong, May 30, 2016

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.