unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Juri Linkov <juri@jurta.org>, emacs-devel@gnu.org
Subject: Re: support for git commit --amend/--signoff
Date: Fri, 11 Jun 2010 13:34:30 -0400	[thread overview]
Message-ID: <yxqhbl9o4m1.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvtyp9znd7.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri\, 11 Jun 2010 10\:18\:34 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> For --amend I think we should have a different mechanism that does not
>> involve editing the text in the *VC-log* buffer, it's a more
>> destructive operation and it's not a good idea to allow the user to do
>> it by mistake by just placing an Amend: line in the buffer.
>
> You might be right, but I don't think it would be terribly bad to have it
> be editable in the buffer (after all it's also just an "--amend" away when
> committing on the command line).
>
> I'm not sure what UI you're considering to use and what users would
> want, because I've never used Git's amend feature.  But I think it
> should be considered in the light of similar functionality in other VCS,
> such as maybe "cvs admin -m" and DaRCS's "amend-record".
>
> For PCL-CVS what I offered was a way to edit a log-message (typically
> called from the log-view buffer).  But admittedly, "cvs admin -m" is
> a fairly different beast from Git's amend.

We already have a UI for that in VC: from the log buffer you can use
"e" to edit the commit log.

git commit --amend is different, it can be used to add more files to
the same commit, and it can only affect the last commit.

> If we only consider Git's and DaRCS's forms of amend, I'd say that the
> "Amend:" header might be a good approach, and that it should specify the
> revision/patch that's amended.  So for Git, you could have a command
> that inserts "Amend: <SHA-1>" and then the backend could check that the
> SHA-1 is the right one (which would avoid accidental use).

That looks like a bad UI: the user sees information that is
unnecessary, and might feel compelled to verify if the sha1 is indeed
to correct one (i.e. time wasted for no good reason).

Other VCs have commands that we might want to support in a similar manner, for example:
hg has --close-branch

So besides the markup in the VC-log buffer, we need another way to
pass arguments to the commit command.



  parent reply	other threads:[~2010-06-11 17:34 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11  6:19 support for git commit --amend/--signoff Dan Nicolaescu
2010-06-11  8:09 ` Juri Linkov
2010-06-11 13:23   ` Dan Nicolaescu
2010-06-11 14:18     ` Stefan Monnier
2010-06-11 16:14       ` Štěpán Němec
2010-06-11 20:26         ` Stefan Monnier
2010-06-12  2:19           ` Dan Nicolaescu
2010-06-12 19:59             ` Juri Linkov
2010-06-12 20:19             ` Stefan Monnier
2010-06-19  6:38               ` Dan Nicolaescu
2010-06-23  7:17                 ` Stefan Monnier
2010-06-23  7:45                   ` David Kastrup
2010-06-23  9:00                   ` Miles Bader
2010-06-23 18:55                     ` Dan Nicolaescu
2010-06-23 18:45                   ` Dan Nicolaescu
2010-06-23 22:04                     ` Stefan Monnier
2010-06-23 23:23                       ` Dan Nicolaescu
2010-06-24 21:03                         ` Stefan Monnier
2010-06-24 21:18                           ` Dan Nicolaescu
2010-06-24 22:25                             ` Stefan Monnier
2010-06-24 23:14                               ` Dan Nicolaescu
2010-06-25  1:16                                 ` Stefan Monnier
2010-06-25  2:27                                   ` Dan Nicolaescu
2010-06-25 11:44                                     ` Miles Bader
2010-06-26  5:09                                       ` Dan Nicolaescu
2010-07-01  0:01                                         ` Stefan Monnier
2010-06-26 10:11                                       ` David Kastrup
2010-06-28 21:04                                         ` Juri Linkov
2010-06-11 17:34       ` Dan Nicolaescu [this message]
2010-06-11 19:27       ` Juri Linkov
2010-06-11 20:16         ` Dan Nicolaescu
2010-06-11 20:38           ` Juri Linkov
2010-06-11 23:48             ` W Dan Meyer
2010-06-12 20:23               ` Juri Linkov
2010-06-12  2:21             ` Dan Nicolaescu
2010-06-11 23:44           ` Thien-Thi Nguyen
2010-06-12 20:15           ` Stefan Monnier
2010-06-11 20:35         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yxqhbl9o4m1.fsf@fencepost.gnu.org \
    --to=dann@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).