[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: support for git commit --amend/--signoff

From: Stefan Monnier
Subject: Re: support for git commit --amend/--signoff
Date: Wed, 23 Jun 2010 09:17:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> We could have a log-edit-extra-flags function that computes a set of
>>> extra flags, and pass those flags to vc-git-checkin.
>> If amend is triggered from a new command (like vc-amend), then there's no
>> need for any special support in log-edit.  We could easily store the
>> relevant info in log-edit-callback or in vc-specific
>> buffer-local variables.
> The problem with that is that vc-amend does not integrate very well
> with C-x v v

That doesn't bother me too much.  I wish we could move further away from
C-x v v since I find it doesn't really work for modern VCSes.

> and it is very Git specific,

Not sure about the "very", but in any case I don't see why that would
argue for integration inside "commit" rather than for the addition of
a separate command.

> and given the reluctance of some other VCs to change history, it does
> not seem that it will be generalized.

DaRCS already supports a more general form of Git's amend.  Bazaar is
unlikely to go there, tho, indeed (although they are not opposed to
adding a more limited command to modify commit-comments).  Don't know
about others.

> More, it does not solve the problem of --signoff (which might be
> adopted by other VCs).

What's the problem with sign-off?  It seems this one fits perfectly well
inside a "Signed-Off-By:" header.

> Here's a solution that takes care of all problems and it is extensible.
> I adds one line to log-edit.el and two to vc.el.
> vc-git-log-edit-get-extra-flags-function does the work in vc-git.el

Why add a var "log-edit-get-extra-flags-function" that's never used by

BTW, I think you can get what you want already without touching any of
vc.el and log-edit.el by making vc-git-log-edit-toggle-amend tweak the
log-edit-callback variable.

Maybe adding an `extra-flags' arg to `checkin' is the better approach,
but adding it everywhere just for the sake of Git doesn't sound too
good, which is why I'm resisting it.

Also as a user I'd *really* like to have a clear visual feedback about
the fact that I'm amending something, which is another reason why having
it inside the headers is an attractive direction.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]