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

Re: Bug: Incorrect stripping of the [PATCH] prefix in git-am

From
Hhuebbe <nathanael.huebbe@informatik.uni-hamburg.de>
Date
Dec 3, 2015, 10:32 UTC
Message-ID
<56601A36.1060803@informatik.uni-hamburg.de>
In-Reply-To
<20151202154948.GA9525@sigill.intra.peff.net>

Dear Peff, I have no problem working around this bug/feature.

I just happen to think that the current *default* behaviour is not the default behaviour that users have a right to expect: I believe that users have every right to expect `git format-patch`/`git am` to preserve commit messages perfectly by default.

Since I see that people are using the current behaviour as a feature, I tried to come up with an alternative behaviour that would do both:

 1. Respect user assumptions to preserve commit messages by default.
 2. Allow users to prepend stuff when mailing a patch, that will get stripped automatically.
Just because the current behaviour is ... irritating.

Cheers, Nathanael

On 12/02/2015 04:49 PM, Jeff King wrote:
Show 14 quoted lines
> On Wed, Dec 02, 2015 at 01:38:18PM +0100, huebbe wrote:
> 
>> As such, I would like to ask whether it would be possible/sensible
>> to somehow escape square brackets, or mark the beginning
>> of the original commit message in the `git format-patch` output?
>> This would allow `git am` to reproduce the exact commit message by default
>> without breaking the "[]" convention.
> 
> I am not sure why "git format-patch -k | git am -k" does not do what you
> want. That is what those options were added for (and what git-rebase
> uses internally to make sure commit messages are left unmunged).
> 
> -Peff
> 
-- 
Please be aware that the enemies of your civil rights and your freedom
are on CC of all unencrypted communication. Protect yourself.
Previous: Jeff King
Message 10 of 10 in “Bug: Incorrect stripping of the [PATCH] prefix in git-am”
  1. huebbeNov 25, 2015
  2. stefan.naewe@atlas-elektronik.comNov 25, 2015
  3. huebbeNov 25, 2015
  4. Jeff KingDec 2, 2015
  5. Stefan BellerDec 2, 2015
  6. Junio C HamanoDec 2, 2015
  7. Junio C HamanoDec 2, 2015
  8. huebbeDec 2, 2015
  9. Jeff KingDec 2, 2015
  10. huebbeDec 3, 2015

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.