Re: [PATCH] git-commit --amend: respect grafted parents.
From: David Kastrup <hidden>
Date: 2016-06-15 22:43:37
Johannes Schindelin [off-list ref] writes:
Hi, On Wed, 26 Sep 2007, Junio C Hamano wrote:quoted
Johannes Sixt [off-list ref] writes:quoted
Johannes Schindelin schrieb:quoted
The reason why I insist on not putting this into --amend is that I think this is not really an amend, but actively a rewrite of the merge commit.You have a point here. I'm convinced. Scrap the patch.I am slow today. Since when --amend is not about "a rewrite of commit"?Technically, you are right, of course. Commit objects are immutable. But from a _porcelain_ view I maintain that "amending" is about changes _to_ a commit. It is not about redefining the (a) parent.
Well, if you already branched off the commit, the changes "to the commit" will not register on the branch. So my view is that amending is about changes to HEAD, not to the HEAD commit. And since branching is certainly a porcelain operation and is clearly not affected by amending commits, I think that the "rewrite of a commit" wording strikes a good balance between "the original commit remains" and "it is functionally replaced in the HEAD". -- David Kastrup