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

Re: [PATCH] merge: add instructions to the commit message when editing

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 30, 2012, 21:03 UTC
Message-ID
<7vy5soaons.fsf@alter.siamese.dyndns.org>
In-Reply-To
<0c9a880c7dca27520f957446c6b0e72e93609b03.1327954927.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> The sentence about justification is one of the few things about
> standard git that are not agnostic to the workflow that the user
> chose.

We try to be agnostic at plumbing level, but I do not think we ever made such a promise at the Porcelain level like "git merge". On the contrary, we try to encourage good workflows by coding behaviours to support BCP to Porcelain commands. Am I misreading what you were trying to say here?

Show 15 quoted lines
> diff --git a/builtin/merge.c b/builtin/merge.c
> index bfb7547..ed628b8 100644
> --- a/builtin/merge.c
> +++ b/builtin/merge.c
> @@ -885,11 +885,22 @@ static void abort_commit(const char *err_msg)
>  	exit(1);
>  }
>  
> +static const char merge_editor_comment[] =
> +N_("Please enter the commit message for your merge commit.  You should\n"
> +"justify it especially if it merges an updated upstream into a topic\n"
> +"branch.\n"
> +"\n"
> +"Lines starting with '#' will be ignored, and an empty message aborts\n"
> +"the commit.\n");
I am tempted to rewrite this a bit, perhaps something like ...
  Please enter the commit message for your merge commit.  Explain
  why the merge is necessary, especially if it merges an updated
  upstream into a topic branch.

... because people who need to be told to "justify it" would probably be helped by a more explicit "explain _why_ it is needed".

Previous: Thomas RastNext: Thomas Rast
Message 7 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.