Re: [PATCH v3 15/15] rebase: change the default backend from "am" to "merge"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 16, 2020, 23:25 UTC
- Message-ID
- <xmqqzhendlvj.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CABPp-BHiYDLRgPX4A1-8f-zgfsDqf6PkToStaV3ukC5Dsq=3-w@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 5 quoted lines
> Why? "Commands which create no more than one commit (git-commit, > git-merge, maybe single-commit git-revert or git-cherry-pick) call > post-commit, commands which create several commits derived from others > (git-am, git-rebase, git-cherry-pick, sometimes git-revert ) call > post-rewrite instead for performance reasons"
Sounds totally wrong. post-rewrite is about carrying forward data that used to be associated with commit X to new commit Y when Y was created by "rewriting" X (i.e. after Y gets created X no longer has any purpose other than as a historical curiosity). There is nothing "for performance reasons" here. There should be nothing for "git revert" to do with post-rewrite (because the resulting commit is not even a rewrite of the commit that was reverted), and "git cherry-pick" is not even a rewrite operation (it is to duplicate an existing commit into another unrelated context, without discarding the original commit).
I am a bit confused...