[PATCH RFC] commit: add --reuse-message for keeping the old commit message during amend

Idan Kamara idankk86 at gmail.com
Tue Feb 12 08:33:23 CST 2013


On Fri, Feb 8, 2013 at 11:34 PM, Durham Goode <durham at fb.com> wrote:
>
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1360352769 28800
> # Node ID a761c31f54ca302d65b33199f6c9368890267eba
> # Parent  e2b176cf28e374eb146c3e131871631ab9ace537
> commit: add --reuse-message for keeping the old commit message during
> amend
>
> When people do 'hg commit --amend', most of the time they don't want to
> change
> the commit message.  This adds a flag to do that without prompting the
> user.
>
> I imagine most people will use it in an alias such as:
>
>   amend=commit --amend --reuse-message
>
> Questions:
> - Anyone have a better name?  'reuse-message' matches git which is why it
> was
> chosen, but it seems a little long.

What about something generic like --no-editor? It's not as explicit
but we already have --editor which forces an editor, so this will do
the opposite.

It also opens up the possibility of appearing in other commands with
similar semantics but without being directly related to amend.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130212/14858072/attachment.html>


More information about the Mercurial-devel mailing list