Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-29 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Jan 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > + /* > > +* If HEAD is not identical to the parent of the original merge commit, > > +* we cannot fast-forward. > > +*/ > > + can_fast_forward = commit && commit->parents && > > +

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-29 Thread Johannes Schindelin
Hi Phillip, On Fri, 19 Jan 2018, Phillip Wood wrote: > 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 fa

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-24 Thread Junio C Hamano
Phillip Wood writes: > I agree that the merge should be recreated, but I was thinking of > something slightly different. Currently the sequencer uses > opts->allow_ff to control whether a new commit with the same contents > should be created even if the existing one could be reused. Ahh, OK. I

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-24 Thread Phillip Wood
On 23/01/18 19:12, Junio C Hamano wrote: Phillip Wood writes: 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-fo

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-23 Thread Junio C Hamano
Phillip Wood writes: > 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

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-23 Thread Junio C Hamano
Johannes Schindelin writes: > + /* > + * If HEAD is not identical to the parent of the original merge commit, > + * we cannot fast-forward. > + */ > + can_fast_forward = commit && commit->parents && > + !oidcmp(&commit->parents->item->object.oid, > +

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-19 Thread Phillip Wood
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 av

[PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-18 Thread Johannes Schindelin
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. Signed-off-