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

Re: [PATCH] merge: use editor by default in interactive sessions

From
Thomas Rast <trast@student.ethz.ch>
Date
Jan 30, 2012, 17:06 UTC
Message-ID
<87hazdazmb.fsf@thomas.inf.ethz.ch>
In-Reply-To
<7vipk26p1b.fsf@alter.siamese.dyndns.org>
On Mon, 23 Jan 2012 14:18:40 -0800, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Traditionally, a cleanly resolved merge was committed by "git merge" using
> the auto-generated merge commit log message with invoking the editor.
> 
> After 5 years of use in the field, it turns out that people perform too
> many unjustified merges of the upstream history into their topic branches.
> These merges are not just useless, but they are often not explained well,
> and making the end result unreadable when it gets time for merging their
> history back to their upstream.

Ok, so I'm late to the party and perhaps I missed the discussion about this, but...

I think the proposed commit message should have a comment, just like for an ordinary commit, that explains why we are showing the user an editor. (I'm too lazy to check, but I suspect we *always* give a comment about what is going on when we fire up an editor.)

I would suggest something like

# Please enter the commit message for your merge commit. Lines starting # with '#' will be ignored, and an empty message aborts the commit.

or if you feel comfortable with educating the user in a workflow-specific way, even

# Please enter the commit message for your merge commit. You should # justify it especially if it merges an updated upstream into a topic # branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 14 in “merge: use editor by default in interactive sessions”
  1. merge: use editor by default in interactive sessionsJunio C Hamano, Jan 23, 2012
  2. Michael HaggertyJan 23, 2012
  3. Junio C HamanoJan 23, 2012
  4. Thomas RastJan 30, 2012
  5. Junio C HamanoJan 30, 2012
  6. merge: add instructions to the commit message when editingThomas Rast, Jan 30, 2012
  7. Junio C HamanoJan 30, 2012
  8. Thomas RastJan 30, 2012
  9. Junio C HamanoJan 30, 2012
  10. Thomas RastJan 31, 2012
  11. Erik Faye-LundFeb 23, 2012
  12. Junio C HamanoFeb 23, 2012
  13. Junio C HamanoFeb 23, 2012
  14. Erik Faye-LundFeb 23, 2012

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.