[Top][All Lists]

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

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

From: Dan Nicolaescu
Subject: Re: support for git commit --amend/--signoff
Date: Fri, 11 Jun 2010 22:19:18 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> 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).
>> No idea about Darcs, but `git commit --amend' always changes the tip of
>> the current branch, you can't specify another commit to amend;
> I know that (and DaRCS doesn't have such a limitation).
>> so the above would not be useful in this case (same for --signoff).
> It is not useful but it is needed because an empty header is normally
> the same as no header, so just "Amend:" can't be enough, we'd have to
> put something there.  I suggested a SHA-1 just because Dan though there
> was a risk of people writing the header by mistake.

That would be a very strong argument agains doing it that way for
amend then.  Coupled with the fact that for amend we actually want to
insert the previous comit log, that calls for a different solution.

We could have a log-edit-extra-flags function that computes a set of
extra flags, and pass those flags to vc-git-checkin.

reply via email to

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