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

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

From
Andreas Ericsson <ae@op5.se>
Date
Aug 10, 2012, 11:00 UTC
Message-ID
<5024E9B7.1070004@op5.se>
In-Reply-To
<20120810103612.GA21562@sigill.intra.peff.net>
On 08/10/2012 12:36 PM, Jeff King wrote:
Show 35 quoted lines
> On Thu, Aug 09, 2012 at 05:13:51PM -0700, H. Peter Anvin wrote:
> 
>> I have some contributors who consistently put their commentary
>> *before* the "---" line rather than *after* it, presumably with the
>> notion that it is some kind of "cover text".  This messes with "git
>> am", and so I end up having to edit those posts manually.
>>
>> I have tried git am --scissors and it doesn't seem to solve the problem.
>>
>> Is there any other option which can be used to automatically process
>> such a patch?
> 
> 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.
> 

End of SOB lines might be a good cutoff, if they're present. I've never seen anyone put commit message text below them anyway.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Jeff KingNext: Junio C Hamano
Message 4 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.