Jared Hance <jaredha...@gmail.com> writes:

[administrivia: do not deflect a direct response to you away by
using mail-followup-to header, thanks]

> On Fri, Aug 17, 2012 at 11:47:49AM -0400, George Spelvin wrote:
>> Something like "git commit --fixup HEAD~3", where "git commit --fixup HEAD"
>> would be equivalent to "git commit --amend".

Yes, as an end-user facing command set, "git commit --amend HEAD~3" would
not be a bad addition.

> Such a simple task shouldn't require an interactive command.

In some cases, yes.  But the devil is in the details, and whoever
wants to work on must be prepared to see cases where the remainder
of the commits after rewriting an older commit will not replay
cleanly on top of it.  At that point, it won't be a simple task
anymore.  At least, it must make it clear what the user should do
when "commit --amend HEAD~3" (and subsequent rebuilding of HEAD~2,
HEAD~1 and HEAD on top of the amended result) needs a help from the
user to resolve conflicts.  It may be just the matter of mentioning
"from here on, follow the procedure you would use when you are
running 'rebase -i'", if the chosen mechanism to implement the
sequencing behind the "commit --amend HEAD~3" UI is "rebase -i".
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to