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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sat Feb 9 09:43:10 CST 2013


On Sat, Feb 09, 2013 at 04:37:49PM +0100, Pierre-Yves David wrote:
> On Sat, Feb 09, 2013 at 11:21:39AM +0100, Mads Kiilerich 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.)
> 
> The name is not nice, but using the same option that git seems a good idea.

Augies told me that git's "reuse-message" takes a commit<stuff> at reuse the
message of this commit. It has no default option and therefore behave different
than we do here.


We need another name.

-- 
Pierre-Yves


More information about the Mercurial-devel mailing list