Subject: Re: [PATCH v2 2/2] trailer: support multiline title

From: Matthieu Moy <[email-masked]>
Date: Wed, 26 Aug 2015 08:07:13 +0200

Christian Couder <[email-masked]> writes:

> Unfortunately this does not work well when a commit is created with a
> line break in the title, using for example the following command:
>
> git commit -m 'place of
> code: change we made'

I confirm that this patch fixes the behavior for me.

Now, I found another issue: I still have this "interpret-trailers" in my
hooks/commit-msg, and it behaves badly when I use "git commit -v". With
-v, I get a diff in COMMIT_EDITMSG, and interpret-trailers tries to
insert my Sign-off within the diff, like this:

  # Do not touch the line above.
  # Everything below will be removed.
  diff --git a/git-multimail/README b/git-multimail/README
  index f41906b..93d4751 100644
  
  Signed-off-by: Matthieu Moy <[email-masked]>
  --- a/git-multimail/README
  +++ b/git-multimail/README

Either commit-msg should be called after stripping the diff from
COMMIT_MSG, or interpret-trailers should learn to stop reading when the
patch starts. I think the first option is better, since it means that
any commit-msg hook does not have to deal with the patch stuff (my guess
is that there are many broken commit-msg hooks out there, but people
didn't notice because they don't use "commit -v").

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/