git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git am and the wrong chunk of ---
Date: Fri, 10 Aug 2012 07:46:02 -0700	[thread overview]
Message-ID: <7vsjbuls9h.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120810103612.GA21562@sigill.intra.peff.net> (Jeff King's message of "Fri, 10 Aug 2012 06:36:13 -0400")

Jeff King <peff@peff.net> writes:

> If I understand your issue, somebody is writing:
>
>
>     From: them
>     To: you
>     Date: ...
>     Subject: [PATCH] subject line
>
>     commit message body
>     ....
>
>     some cover letter material that should go below the "---"
>     ---
>       [diffstat + diff]
>
> How do you know when the commit message body ends, and the cover letter
> begins? We already have two machine-readable formats for separating the
> two ("---" after the commit message, and "-- >8 --" scissors before). Is
> there some machine-readable hint? Is it always the paragraph before the
> "---"? Chopping that off unconditionally seems like a dangerous
> heuristic.

Or it could be like this:

    ...
    Subject: [PATCH] patch title

    Heya,

    I was walking my dog when I found a solution to this
    problem the other day.  Here it is.

    commit message body

    S-o-b: ...
    ---

And I agree that clever heuristics are dangerous.  We need to draw a
line somewhere anyway, and the line should be at the place that is
easily understandable to people.  That means mechanically parseable
and easy to follow convention to use markers e.g. "---".

  parent reply	other threads:[~2012-08-10 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10  0:13 git am and the wrong chunk of --- H. Peter Anvin
2012-08-10  1:26 ` Junio C Hamano
2012-08-10 10:36 ` Jeff King
2012-08-10 11:00   ` Andreas Ericsson
2012-08-10 14:46   ` Junio C Hamano [this message]
2012-08-10 14:48     ` H. Peter Anvin
2012-08-10 16:15       ` Junio C Hamano
2012-08-10 16:39         ` H. Peter Anvin

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=7vsjbuls9h.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hpa@zytor.com \
    --cc=peff@peff.net \
    /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).