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

Re: Add option in git-am to ignore leading text?

From
FPFrans Pop <elendil@planet.nl>
Date
Jul 28, 2009, 17:38 UTC
Message-ID
<200907281938.24960.elendil@planet.nl>
In-Reply-To
<20090728142219.GA16168@vidovic>
On Tuesday 28 July 2009, Nicolas Sebrecht wrote:
Show 8 quoted lines
> The 28/07/09, Frans Pop wrote:
> > That's a very useful feature. However, on lkml there are frequently
> > also mails with the following structure (example: [1]).
> >
> > [1] http://lkml.org/lkml/2009/7/10/49
>
> This is an example of what not to do. Content after the '---' won't be
> part of the commit message.

Yes, I'm aware of that (and I omitted such a line from my example for that reason). But currently that's not really relevant as either with or without that line one needs to manually fix up things before the desired result is obtained.

If my feature request is implemented I'll of course make sure to omit the '---' line if needed.

Here are some other examples (some of which would equally need to drop or change a separator line). http://lkml.org/lkml/2009/6/25/62 http://lkml.org/lkml/2009/6/22/114 http://lkml.org/lkml/2009/6/30/109 http://lkml.org/lkml/2009/6/30/224

Show 8 quoted lines
> IMHO, a better way would be to ignore lines beginning with a defined
> level of quotes in the commit message (the "level" beeing the number of
> '>' or '> ' found at the beginning of a line. Something like
>
> 	--strip-quotes[=N]
>
> where N is the level of quoted lines to remove (if "=N" is
> not given, assume that the level is 1 and remove all the quotes).

As Mark Brown has already said, that won't solve the issue for an introduction or comments added by the sender of the mail. Also, people use all kinds of quoting schemes, not just leading ">".

And I've also seen plenty of cases where quoted lines _were_ a desired part of a commit log.

Thanks, FJP

Previous: Mark BrownNext: Nicolas Sebrecht
Message 4 of 7 in “Add option in git-am to ignore leading text?”
  1. Frans PopJul 28, 2009
  2. Nicolas SebrechtJul 28, 2009
  3. Mark BrownJul 28, 2009
  4. Frans PopJul 28, 2009
  5. Nicolas SebrechtJul 28, 2009
  6. Frans PopJul 28, 2009
  7. Frans PopJul 28, 2009

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.