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

Re: How to enhance merge commit message ?

From
Junio C Hamano <junkio@cox.net>
Date
Jan 30, 2007, 04:45 UTC
Message-ID
<7v8xfl6s27.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200701301032.24917.litvinov2004@gmail.com>
Alexander Litvinov <litvinov2004@gmail.com> writes:
> git's git repo contains a lot of merges with nice commit message, 
> like this (d96497b8d):
> ....
> How can I made the same messages using git pull . <branch> ?
$ grep -A2 '^merge\.summary' Documentation/config.txt
merge.summary::
	Whether to include summaries of merged commits in newly created
	merge commit messages. False by default.

This is a good option if you are doing the top-level "bundling of others' work -- people will base their further work on this" merges. On the other hand, if you are merging from your uplevel because your work depends on something that was updated recently, having the merge summary is often pointless (because the merge would bring in many mostly unrelated commits, in addition to that something your work depends on). I think Linus has explicitly asked this option not enabled by people he pulls from for this reason.

We might want to have a per-branch option to control this behaviour at finer grained level. I would enable it for my four primary integration branches (maint, master, next, and pu) but not for topic branches. That way, if a topic needs a fix that happened on the master since it forked, the tip of the master will be merged back to the topic without the merge summary message (I would describe why that merge in an unusual direction was needed in the commit message anyway).

Previous: Alexander LitvinovNext: Alexander Litvinov
Message 2 of 3 in “How to enhance merge commit message ?”
  1. Alexander LitvinovJan 30, 2007
  2. Junio C HamanoJan 30, 2007
  3. Alexander LitvinovJan 30, 2007

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.