git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Eric Wong <e@80x24.org>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH 1/3] pretty: support "mboxrd" output format
Date: Fri, 3 Jun 2016 19:03:59 -0700	[thread overview]
Message-ID: <CAPc5daWJ1v8EU89UN2HPK8=U17vz4LiANA9FyCvH5as7Hb1bTQ@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cQ7y7J02+PVtdJywGEudOGXsy1jgadvVwBg5creiUv6zA@mail.gmail.com>

On Fri, Jun 3, 2016 at 5:19 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> 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?

  reply	other threads:[~2016-06-04  2:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 23:21 [RFC/PATCH 0/3] support mboxrd format Eric Wong
2016-05-30 23:21 ` [PATCH 1/3] pretty: support "mboxrd" output format Eric Wong
2016-05-31  3:40   ` Eric Sunshine
2016-05-31  7:45     ` Eric Wong
2016-05-31 18:10       ` Eric Sunshine
2016-05-31 18:29         ` Eric Wong
2016-05-31 20:12           ` Eric Sunshine
2016-05-31 20:19             ` Eric Sunshine
2016-06-02  7:51           ` Eric Wong
2016-06-03 22:22             ` Eric Sunshine
2016-06-03 22:36               ` Junio C Hamano
2016-06-03 22:59                 ` Eric Sunshine
2016-06-03 23:42                   ` Junio C Hamano
2016-06-04  0:02                     ` Eric Sunshine
2016-06-04  0:19                       ` Eric Sunshine
2016-06-04  2:03                         ` Junio C Hamano [this message]
2016-05-30 23:21 ` [PATCH 2/3] mailsplit: support unescaping mboxrd messages Eric Wong
2016-05-30 23:21 ` [PATCH 3/3] am: support --patch-format=mboxrd Eric Wong

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='CAPc5daWJ1v8EU89UN2HPK8=U17vz4LiANA9FyCvH5as7Hb1bTQ@mail.gmail.com' \
    --to=gitster@pobox.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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 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 NNTP newsgroup(s).