git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-commit --amend: respect grafted parents.

From
David Kastrup <dak@gnu.org>
Date
Sep 27, 2007, 08:39 UTC
Message-ID
<86hclgijtb.fsf@lola.quinscape.zz>
In-Reply-To
<Pine.LNX.4.64.0709262039250.28395@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 18 quoted lines
> Hi,
>
> On Wed, 26 Sep 2007, Junio C Hamano wrote:
>
>> Johannes Sixt <j.sixt@viscovery.net> writes:
>> 
>> > Johannes Schindelin schrieb:
>> >> 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
Previous: Johannes Schindelin
Message 8 of 8 in “git-commit --amend: respect grafted parents.”
  1. git-commit --amend: respect grafted parents.Johannes Sixt, Sep 26, 2007
  2. Johannes SchindelinSep 26, 2007
  3. Johannes SixtSep 26, 2007
  4. Johannes SchindelinSep 26, 2007
  5. Johannes SixtSep 26, 2007
  6. Junio C HamanoSep 26, 2007
  7. Johannes SchindelinSep 26, 2007
  8. David KastrupSep 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.