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

Re: git am and the wrong chunk of ---

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Aug 10, 2012, 14:48 UTC
Message-ID
<b661ef79-510e-4be6-bed2-451e9967db6f@email.android.com>
In-Reply-To
<7vsjbuls9h.fsf@alter.siamese.dyndns.org>
The users I am referring to generally have a --- line, rather than a scissor, between the cover text and commit.  Also, there is (almost) always a From: line and subject at the top of the patch proper.
Junio C Hamano <gitster@pobox.com> wrote:
Show 47 quoted lines
>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. "---".
-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 8 in “git am and the wrong chunk of ---”
  1. H. Peter AnvinAug 10, 2012
  2. Junio C HamanoAug 10, 2012
  3. Jeff KingAug 10, 2012
  4. Andreas EricssonAug 10, 2012
  5. Junio C HamanoAug 10, 2012
  6. H. Peter AnvinAug 10, 2012
  7. Junio C HamanoAug 10, 2012
  8. H. Peter AnvinAug 10, 2012

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.