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

Re: blank lines in pre-created merge message

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 25, 2019, 10:07 UTC
Message-ID
<nycvar.QRO.7.76.6.1907251204310.21907@tvgsbejvaqbjf.bet>
In-Reply-To
<5D382AC1020000A100032608@gwsmtp.uni-regensburg.de>
Hi Ulrich,
On Wed, 24 Jul 2019, Ulrich Windl wrote:
Show 12 quoted lines
> I think I had tried bringing this to your attention before, but I think it was
> without success.
> The issue may seem purely cosmetical, while being easy to fix (is my guess):
>
> When using "git merge --no-ff --no-commit ..", the pre-created merge message
> always contains two empty lines in between the comment lines. However if there
> was a merge conflict (being resolved) an extra blank line is added after the
> first line.
>
> In vi those empty lines are easy to spot, and I routinely remove them. But
> maybe it's better not to create them at the beginning. (A "normal commit" never
> creates any emüpty lines in the pre-created comment)

I could imagine that https://github.com/gitgitgadget/git/commit/b2f5171ecc2feb4192acd80f5a6b05c06e099e97 addresses that. Would be good if you could try; just build `pu` from https://github.com/git/git (`make install` will install it into your `$HOME/bin` and you can test that easily).

If not, how about giving it a try to fix it yourself? This is open source, giving you great power to change the entire source code in your local repository as you wish. And of course, with great power... comes great responsibility.

> My Git version is 2.12.3, but the bug is probably quite old...

You might think that the bug is probably quite old, but what is really old is your Git version. The current one is v2.22.0.

First order of business should be to verify that it has not been fixed in the meantime ;-)

Ciao, Johannes

Previous: Ulrich WindlNext: Ulrich Windl
Message 2 of 7 in “blank lines in pre-created merge message”
  1. Ulrich WindlJul 24, 2019
  2. Johannes SchindelinJul 25, 2019
  3. Antw: Re: blank lines in pre-created merge messageUlrich Windl, Jul 25, 2019
  4. Johannes SchindelinJul 25, 2019
  5. Ulrich WindlJul 30, 2019
  6. Johannes SchindelinJul 31, 2019
  7. Johannes SchindelinAug 2, 2019

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.