Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 29, 2018, 21:47 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1801292245030.35@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
- In-Reply-To
- <7e6906c9-d642-ee8d-82fd-29ee6c60e308@talktalk.net>
Hi Phillip,
On Fri, 19 Jan 2018, Phillip Wood wrote:
Show 11 quoted lines
> On 18/01/18 15:35, Johannes Schindelin wrote: > > > > Just like with regular `pick` commands, if we are trying to recreate a > > merge commit, we now test whether the parents of said commit match HEAD > > and the commits to be merged, and fast-forward if possible. > > > > This is not only faster, but also avoids unnecessary proliferation of > > new objects. > > I might have missed something but shouldn't this be checking > opts->allow_ff?
Good point. This is the type of review for which I was hoping.
> Another possible optimization is that if the parent branches have only > reworded commits or some commits that have been squashed but no other > changes then their trees will be the same as in the original merge > commit and so could be reused without calling merge_recursive().
True. It is also a bit involved to check this condition, and I am not sure that it is worth the effort for my use case.
So I would invite you to work on this after this patch series settles, if you are interested.
Ciao, Dscho