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

Idan Kamara idankk86 at gmail.com
Sat Feb 9 04:29:13 CST 2013


On Sat, Feb 9, 2013 at 12:21 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>
> On 02/09/2013 12:05 AM, Augie Fackler wrote:
>>
>> On Feb 8, 2013, at 9: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.
>>
>> I don't have a better one.
>
>
> We usually don't use '-' in option names.
>
> (--reuse-message might be long, but it is still shorter than --config
> ui.editor=true ... and more cross platform. The feature is still nice to
> have, but not something completely new.)
>
> It would perhaps be better to name the option after what it does instead
> of what it doesn't do. Perhaps something like 'filesonly'.
>
> This option seems to be the opposite of 'qref -e' ... but I guess it is
> too late to change the default for amend ...

Choosing that default was a pretty conscious choice (albeit with
some preferring the opposite):

http://markmail.org/message/a4jrwzq2232w6tcz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130209/9aee41f0/attachment.html>


More information about the Mercurial-devel mailing list