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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2012, 01:26 UTC
Message-ID
<7v393vmtaa.fsf@alter.siamese.dyndns.org>
In-Reply-To
<5024523F.3050208@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
Show 11 quoted lines
> Hello,
>
> 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?

I hate to be the one who is telling you this, but if the submitter cannot be trained to write supporting material after "---" as the convention across git using projects suggest him to do, it is likely that he didn't write supporting material before the scissors, or did not resist the temptation to deviate from the accepted shape of the scissors (e.g. "-- >8 --") just to be creative. For that matter, I would be mildly surprised if the material in the middle is usable as is as an acceptable log message from such a submitter X-<.

So in short, no, --scissors (or -c in short) is not any more magical than the traditional "---".

Previous: H. Peter AnvinNext: Jeff King
Message 2 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.