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

Re: Multi-line commit message changed to a single one

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Jun 13, 2014, 13:40 UTC
Message-ID
<CABPQNSbBugkr-BVph3zxmaE5jjfuoagmmr1c9ivGOyMuTkbSRg@mail.gmail.com>
In-Reply-To
<b1056272-4b49-439e-a071-88b4262066bb@googlegroups.com>
On Fri, Jun 13, 2014 at 1:44 PM,  <jese.jlf@gmail.com> wrote:
Show 13 quoted lines
> Hi,
>
>      Here is a simple script to show my problem. I don't know if it's a
> wrong operation (from me), a wrong configuration/parameter, or either a bug,
> but I don't get what I expected.
>      From a git repo (#1), I created a commit message containing two lines.
> Then I created a patch (git format-patch) and copy/paste it to another git
> repo (#2). When I import this patch (git am), the commit message is modified
> and both lines are "merged" to a single one.
>     Screenshot providen (repo1 : two separated lines, repo2 : a single line)
> with .sh script to reproduce the whole test-case.
>
> If someone could tell me what is wrong... Thanks in advance

This isn't unique to Git for Windows, I just tested on Linux and the same occurs.

What seems to happen is that git format-patch puts both lines in the subject of the e-mail, as you can find described here:

https://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html

"By default, the subject of a single patch is "[PATCH] " followed by the concatenation of lines from the commit message up to the first blank line (see the DISCUSSION section of git-commit(1))."

So, this is entirely intentional, it seems.
-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message 1 of 1 in “Re: Multi-line commit message changed to a single one”
  1. Erik Faye-LundJun 13, 2014

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.