Re: [BUG] git-rebase fails when a commit message contains a diff
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Nov 9, 2007, 07:03 UTC
- Message-ID
- <B2BAA0E1-8DA7-417D-AE25-53D8690810ED@zib.de>
- In-Reply-To
- <7vhcjwxk1s.fsf@gitster.siamese.dyndns.org>
On Nov 9, 2007, at 2:51 AM, Junio C Hamano wrote:
Show 14 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> That's a known design limitation of applymbox/mailinfo. Any
>> line that looks like a beginning of a patch in e-mail ("^--- ",
>> "^---$", "^diff -", and "^Index: ") terminates the commit log.
>
> Ok, so that explains the symptom. What's the next step?
>
> * The applymbox/mailinfo pair should continue to split the
> commit log message at the first such line. There is no point
> breaking established workflow, and people in communities that
> exchange patches via e-mail already know to avoid this issue
> by indenting quoted diff snippet in the log message,
> e.g. 5be507fc.I wasn't aware of this.
Maybe git-commit should validate commit messages? If people have a notion of a well-formed commit message this should be verified. The message should not contain strings that indicate termination of the commit message when sent by email. If commit did this the evil strings would never enter a commit message in the first place.
Actually I sometimes use '---' as a separator in text. I'm sure I'll forget at some point that I must not use it in a commit message. I'd be happy if git saved me from this.
If I understand correctly, the problem will remain when sending patches by emails; even if git-rebase was changed to use merge. Or does git-format-patch quote evil strings in commit messages?
Steffen