Re: Is rebase --force-rebase any different from rebase --no-ff?
- Date: Wed, 9 May 2018 22:46:31 +0300
- From: Ilya Kantor <iliakan@xxxxxxxxx>
- Subject: Re: Is rebase --force-rebase any different from rebase --no-ff?
I tried to compare --force-rebase VS --no-ff for the following repository:
There's no difference in the resulf of:
git rebase --force-rebase 54a4
git rebase --no-ff 54a4
(rebases all 3 commits of feature)
Also, there's no difference in interactive mode:
git rebase --force-rebase -i 54a4
git rebase --no-ff -i 54a4
(picks all 3 commits of feature)
Is there a case where --no-ff differs from --force-rebase?
On Wed, May 9, 2018 at 10:27 PM, Marc Branchaud <marcnarc@xxxxxxxxxxx> wrote:
> On 2018-05-09 02:21 PM, Stefan Beller wrote:
>> +cc Marc and Johannes who know more about rebase.
>> On Wed, May 9, 2018 at 9:01 AM, Ilya Kantor <iliakan@xxxxxxxxx> wrote:
>>> Right now in "git help rebase" for --no-ff:
>>> "Without --interactive, this is a synonym for --force-rebase."
>>> But *with* --interactive, is there any difference?
>> I found
>> from 2010-03-24
> In the original discussion around this option , at one point I proposed
> teaching rebase--interactive to respect --force-rebase instead of adding a
> new option . Ultimately --no-ff was chosen as the better user interface
> design , because an interactive rebase can't be "forced" to run.
> At the time, I think rebase--interactive only recognized --no-ff. That
> might have been muddled a bit in the migration to rebase--helper.c.
> Looking at it now, I don't have a strong opinion about keeping both options
> or deprecating one of them.
>  https://public-inbox.org/git/4B9FD9C1.9060200@xxxxxxxxxxx/t/
>  https://public-inbox.org/git/7vzl1yd5j4.fsf@xxxxxxxxxxxxxxxxxxxxxxxx/
>> Teach rebase the --no-ff option.
>> For git-rebase.sh, --no-ff is a synonym for --force-rebase.
>> For git-rebase--interactive.sh, --no-ff cherry-picks all the commits
>> the rebased branch, instead of fast-forwarding over any unchanged
>> --no-ff offers an alternative way to deal with reverted merges.
>> Instead of
>> "reverting the revert" you can use "rebase --no-ff" to recreate the
>> with entirely new commits (they're new because at the very least the
>> committer time is different). This obviates the need to revert the
>> reversion, as you can re-merge the new topic branch directly. Added
>> addendum to revert-a-faulty-merge.txt describing the situation and
>> how to
>> use --no-ff to handle it.
>> which sounds as if there is?