[PATCH RFC] commit: add --amend option to amend the parent changeset
Pierre-Yves David
pierre-yves.david at logilab.fr
Tue Feb 21 17:18:36 UTC 2012
On Tue, Feb 21, 2012 at 12:18:05PM +0200, Idan Kamara wrote:
> 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.
I still disagree on this point. From the user point of view:
"commit" *create* a new changeset.
"amend" *update* the content of an existing changeset.
This is not the same thing at all.
qnew != qrefresh
commit != amend
> > 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.
I expect amend to become a very common operation (at least as much as qrefresh
is).
> 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)
The same kind of reasoning are port of my advocacy for a dedicated command. To
make sure people people really mean amend they just have to type the dedicated
command. This will prevent unfortunate mistake and misunderstanding by new
comers.
A dedicated command allow simple and elegant short form.
--
Pierre-Yves David
http://www.logilab.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20120221/ccafec38/attachment.asc>
More information about the Mercurial-devel
mailing list