Subject: Re: [PATCH 2/3] rebase: accept -<number> as another way of saying HEAD~<number>

From: Junio C Hamano <[email-masked]>
Date: Mon, 03 Mar 2014 13:44:05 -0800

Michael Haggerty <[email-masked]> writes:

> This might be a reason that "-NUM" is a bad idea.
>
> Or perhaps "-NUM" should fail with an error message if any of the last
> NUM commits are merges.  In that restricted scenario (which probably
> accounts for 99% of rebases), "-NUM" is equivalent to "HEAD~NUM".

That sounds like one possible way out; the opposite would be to
enable mode that preserges merges when we see any.

If "rebase" had a "--first-parent" mode that simply replays only the
commits on the first parent chain, merging the same second and later
parents without looking at their history when dealing with merge
commits, and always used that mode unless "--flatten-history" was
given, the world might have been a better place.  We cannot go there
in a single step, but we could plan such a backward incompatible
migration if we wanted to.