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

Re: How to use git-fmt-merge-msg?

From
SBSanti Béjar <santi@agolina.net>
Date
Feb 5, 2009, 12:59 UTC
Message-ID
<adf1fd3d0902050459s4fcb914ai2b9c8c04e9f72b02@mail.gmail.com>
In-Reply-To
<84B3CCAA-A044-4517-B2C8-14D5DD754FD2@manchester.ac.uk>
2009/2/5 Robert Haines <rhaines@manchester.ac.uk>:
Show 16 quoted lines
> Hi all,
>
> I would like to use git-fmt-merge-msg to produce automatic summaries of what
> commits are being merged when I merge one branch into the other - like I see
> all the time in git.git, etc. The problem I am having is that I can only
> seem to get it to work with remote branches via .git/FETCH_HEAD - basically
> I don't know what else I can feed it to do what I want.
>
> Say I have a local repo with no remotes so no .git/FETCH_HEAD. Can I use
> git-fmt-merge-msg to produce such a summary when I'm just merging local
> branches? I've tried feeding just about everything I can find in .git/ into
> it but with no luck. Is there anything generated during the merge that can
> be used as input if I do a merge --no-commit? A list of merged commits or
> something?
>
> I'm sure I've missed something simple here...
Sure :-)
Manpage of git merge:
       --log
           In addition to branch names, populate the log message with one-line
           descriptions from the actual commits that are being merged.
Manpage of git config:
       merge.log
           Whether to include summaries of merged commits in newly created
           merge commit messages. False by default.

HTH, Santi

Previous: Robert HainesNext: Robert Haines
Message 2 of 4 in “How to use git-fmt-merge-msg?”
  1. Robert HainesFeb 5, 2009
  2. Santi BéjarFeb 5, 2009
  3. Robert HainesFeb 5, 2009
  4. Santi BéjarFeb 5, 2009

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.