[PATCH RFC] commit: add --amend option to amend the parent changeset

Idan Kamara idankk86 at gmail.com
Tue Feb 21 04:18:05 CST 2012


On Mon, Feb 20, 2012 at 6:29 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>
> On Mon, 20 Feb 2012 17:19:44 +0100
> Jason Harris <jason at jasonfharris.com> wrote:
> >
> > To the user, the amend part is really associated with commit. It's doing
> > the
> > same thing.
>
> To me as an user, it doesn't. Modifying is not the same as creating.
> Actually, most software has "New document" and "Open document" as
> separate (GUI) commands.
>
> > Having to have a separate command for it is semantically wrong.
> > Besides, in almost all the commands one uses options, eg maybe the -A
> > (--addremove) to commit, or the -l (--limit) to log etc, etc.
>
> I mostly use commit without options. I also often use log without
> options (I have the pager extension enabled, so I don't have to
> specify -l).
>
> > Option use
> > is a normal part of mercurial so the reasoning of "use a new command"
> > instead of
> > an "option" just doesn't wash for me.
>
> Do you plan to introduce a short-hand for "--amend", at least?

I don't think the use case of amend warrants a short flag, so I'd advise
against it. When someone wants to amend I'd want them to be sure
that that's what they want to do. Having to type a few more letters
will help make sure of that and prevent unfortunate mistakes.

(also, the straight forward letter for it would be 'a' which can be
easily mistyped when wanting -A)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120221/a953d4a1/attachment.html>


More information about the Mercurial-devel mailing list