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

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

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 26, 2015, 06:28 UTC
Message-ID
<CA+P7+xqaAKckB0P5oqFS64BWU2H1OsVX8Oq=CLLW8PMJ5fdenQ@mail.gmail.com>
In-Reply-To
<vpqa8tetwfi.fsf@anie.imag.fr>

On Tue, Aug 25, 2015 at 11:07 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 33 quoted lines
> Christian Couder <christian.couder@gmail.com> 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 <Matthieu.Moy@imag.fr>
>   --- 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,
>

It's always confused me why commit -v doesn't prepend every inserted line with "#" to mark it as a comment.

Regards, Jake

Previous: Matthieu MoyNext: Christian Couder
Message 4 of 9 in “trailer: ignore first line of message”
  1. 1/2 trailer: ignore first line of messageChristian Couder, Aug 26, 2015
  2. 2/2 trailer: support multiline titleChristian Couder, Aug 26, 2015
  3. Matthieu MoyAug 26, 2015
  4. Jacob KellerAug 26, 2015
  5. Christian CouderAug 26, 2015
  6. Junio C HamanoAug 26, 2015
  7. Matthieu MoyAug 26, 2015
  8. Junio C HamanoAug 26, 2015
  9. Christian CouderAug 29, 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.