{"thread":{"id":"48443","subject":"Is rebase --force-rebase any different from rebase --no-ff?","startedAt":"2018-05-09T16:01:56Z","lastAt":"2018-05-10T18:53:55Z","messageCount":6,"participants":["Ilya Kantor","Stefan Beller","Marc Branchaud"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"347091","messageId":"CAFU8umjyrJc1m65hu6QMQUiNmsJtbV65tovcWjvmzFpsCr668A@mail.gmail.com","threadId":"48443","inReplyTo":null,"subject":"Is rebase --force-rebase any different from rebase --no-ff?","fromName":"Ilya Kantor","fromEmail":"iliakan@gmail.com","sentAt":"2018-05-09T16:01:32Z","receivedAt":"2018-05-09T16:01:56Z","isPatch":false,"sender":{"key":"iliakan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349336?v=4"},"body":"Right now in \"git help rebase\" for --no-ff:\n\"Without --interactive, this is a synonym for --force-rebase.\"\n\nBut *with* --interactive, is there any difference?\n\nAfter doing some tests and looking in the source I couldn't find any\ndifference between those two at all.\n\nProbably, there was a difference some time ago, but not now?\n\nThen one of them can be safely deprecated.\n\n---\nBest Regards,\nIlya Kantor\n"},{"id":"347121","messageId":"CAGZ79kb05U91_Ku7DKuwQVCrtouYwGWTCPdJFQ=bgWo91inRGA@mail.gmail.com","threadId":"48443","inReplyTo":"CAFU8umjyrJc1m65hu6QMQUiNmsJtbV65tovcWjvmzFpsCr668A@mail.gmail.com","subject":"Re: Is rebase --force-rebase any different from rebase --no-ff?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-05-09T18:21:53Z","receivedAt":"2018-05-09T18:21:58Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"+cc Marc and Johannes who know more about rebase.\n\nOn Wed, May 9, 2018 at 9:01 AM, Ilya Kantor <iliakan@gmail.com> wrote:\n> Right now in \"git help rebase\" for --no-ff:\n> \"Without --interactive, this is a synonym for --force-rebase.\"\n>\n> But *with* --interactive, is there any difference?\n\nI found\nhttps://code.googlesource.com/git/+/b499549401cb2b1f6c30d09681380fd519938eb0\nfrom 2010-03-24\n\n    Teach rebase the --no-ff option.\n\n    For git-rebase.sh, --no-ff is a synonym for --force-rebase.\n\n    For git-rebase--interactive.sh, --no-ff cherry-picks all the commits in\n    the rebased branch, instead of fast-forwarding over any unchanged commits.\n\n    --no-ff offers an alternative way to deal with reverted merges.  Instead of\n    \"reverting the revert\" you can use \"rebase --no-ff\" to recreate the branch\n    with entirely new commits (they're new because at the very least the\n    committer time is different).  This obviates the need to revert the\n    reversion, as you can re-merge the new topic branch directly.  Added an\n    addendum to revert-a-faulty-merge.txt describing the situation and how to\n    use --no-ff to handle it.\n\nwhich sounds as if there is?\n\nStefan\n"},{"id":"347126","messageId":"98279912-0f52-969d-44a6-22242039387f@xiplink.com","threadId":"48443","inReplyTo":"CAGZ79kb05U91_Ku7DKuwQVCrtouYwGWTCPdJFQ=bgWo91inRGA@mail.gmail.com","subject":"Re: Is rebase --force-rebase any different from rebase --no-ff?","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2018-05-09T19:27:24Z","receivedAt":"2018-05-09T19:27:29Z","isPatch":false,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2018-05-09 02:21 PM, Stefan Beller wrote:\n> +cc Marc and Johannes who know more about rebase.\n> \n> On Wed, May 9, 2018 at 9:01 AM, Ilya Kantor <iliakan@gmail.com> wrote:\n>> Right now in \"git help rebase\" for --no-ff:\n>> \"Without --interactive, this is a synonym for --force-rebase.\"\n>>\n>> But *with* --interactive, is there any difference?\n> \n> I found\n> https://code.googlesource.com/git/+/b499549401cb2b1f6c30d09681380fd519938eb0\n> from 2010-03-24\n\nIn the original discussion around this option [1], at one point I \nproposed teaching rebase--interactive to respect --force-rebase instead \nof adding a new option [2].  Ultimately --no-ff was chosen as the better \nuser interface design [3], because an interactive rebase can't be \n\"forced\" to run.\n\nAt the time, I think rebase--interactive only recognized --no-ff.  That \nmight have been muddled a bit in the migration to rebase--helper.c.\n\nLooking at it now, I don't have a strong opinion about keeping both \noptions or deprecating one of them.\n\n\t\tM.\n\n[1] https://public-inbox.org/git/4B9FD9C1.9060200@xiplink.com/t/\n[2] \nhttps://public-inbox.org/git/1269361187-31291-1-git-send-email-marcnarc@xiplink.com/\n[3] https://public-inbox.org/git/7vzl1yd5j4.fsf@alter.siamese.dyndns.org/\n\n\n>      Teach rebase the --no-ff option.\n> \n>      For git-rebase.sh, --no-ff is a synonym for --force-rebase.\n> \n>      For git-rebase--interactive.sh, --no-ff cherry-picks all the commits in\n>      the rebased branch, instead of fast-forwarding over any unchanged commits.\n> \n>      --no-ff offers an alternative way to deal with reverted merges.  Instead of\n>      \"reverting the revert\" you can use \"rebase --no-ff\" to recreate the branch\n>      with entirely new commits (they're new because at the very least the\n>      committer time is different).  This obviates the need to revert the\n>      reversion, as you can re-merge the new topic branch directly.  Added an\n>      addendum to revert-a-faulty-merge.txt describing the situation and how to\n>      use --no-ff to handle it.\n> \n> which sounds as if there is?\n> \n> Stefan\n> \n"},{"id":"347127","messageId":"CAFU8umhPCTTUc=EZYGDhFe=GeW7_GdyrqZU0DVg7xYaE+Ajg2A@mail.gmail.com","threadId":"48443","inReplyTo":"98279912-0f52-969d-44a6-22242039387f@xiplink.com","subject":"Re: Is rebase --force-rebase any different from rebase --no-ff?","fromName":"Ilya Kantor","fromEmail":"iliakan@gmail.com","sentAt":"2018-05-09T19:46:31Z","receivedAt":"2018-05-09T19:48:03Z","isPatch":false,"sender":{"key":"iliakan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349336?v=4"},"body":"I tried to compare --force-rebase VS --no-ff for the following repository:\nhttp://jmp.sh/E7TRjcL\n\nThere's no difference in the resulf of:\ngit rebase --force-rebase 54a4\ngit rebase --no-ff 54a4\n\n(rebases all 3 commits of feature)\n\nAlso, there's no difference in interactive mode:\ngit rebase --force-rebase -i 54a4\ngit rebase --no-ff -i 54a4\n\n(picks all 3 commits of feature)\n\nIs there a case where --no-ff differs from --force-rebase?\n\n---\nBest Regards,\nIlya Kantor\n\n\nOn Wed, May 9, 2018 at 10:27 PM, Marc Branchaud <marcnarc@xiplink.com> wrote:\n> On 2018-05-09 02:21 PM, Stefan Beller wrote:\n>>\n>> +cc Marc and Johannes who know more about rebase.\n>>\n>> On Wed, May 9, 2018 at 9:01 AM, Ilya Kantor <iliakan@gmail.com> wrote:\n>>>\n>>> Right now in \"git help rebase\" for --no-ff:\n>>> \"Without --interactive, this is a synonym for --force-rebase.\"\n>>>\n>>> But *with* --interactive, is there any difference?\n>>\n>>\n>> I found\n>>\n>> https://code.googlesource.com/git/+/b499549401cb2b1f6c30d09681380fd519938eb0\n>> from 2010-03-24\n>\n>\n> In the original discussion around this option [1], at one point I proposed\n> teaching rebase--interactive to respect --force-rebase instead of adding a\n> new option [2].  Ultimately --no-ff was chosen as the better user interface\n> design [3], because an interactive rebase can't be \"forced\" to run.\n>\n> At the time, I think rebase--interactive only recognized --no-ff.  That\n> might have been muddled a bit in the migration to rebase--helper.c.\n>\n> Looking at it now, I don't have a strong opinion about keeping both options\n> or deprecating one of them.\n>\n>                 M.\n>\n> [1] https://public-inbox.org/git/4B9FD9C1.9060200@xiplink.com/t/\n> [2]\n> https://public-inbox.org/git/1269361187-31291-1-git-send-email-marcnarc@xiplink.com/\n> [3] https://public-inbox.org/git/7vzl1yd5j4.fsf@alter.siamese.dyndns.org/\n>\n>\n>>      Teach rebase the --no-ff option.\n>>\n>>      For git-rebase.sh, --no-ff is a synonym for --force-rebase.\n>>\n>>      For git-rebase--interactive.sh, --no-ff cherry-picks all the commits\n>> in\n>>      the rebased branch, instead of fast-forwarding over any unchanged\n>> commits.\n>>\n>>      --no-ff offers an alternative way to deal with reverted merges.\n>> Instead of\n>>      \"reverting the revert\" you can use \"rebase --no-ff\" to recreate the\n>> branch\n>>      with entirely new commits (they're new because at the very least the\n>>      committer time is different).  This obviates the need to revert the\n>>      reversion, as you can re-merge the new topic branch directly.  Added\n>> an\n>>      addendum to revert-a-faulty-merge.txt describing the situation and\n>> how to\n>>      use --no-ff to handle it.\n>>\n>> which sounds as if there is?\n>>\n>> Stefan\n>>\n>\n"},{"id":"347287","messageId":"bc722982-042a-53cc-e3b3-7c2428952062@xiplink.com","threadId":"48443","inReplyTo":"CAFU8umhPCTTUc=EZYGDhFe=GeW7_GdyrqZU0DVg7xYaE+Ajg2A@mail.gmail.com","subject":"Re: Is rebase --force-rebase any different from rebase --no-ff?","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2018-05-10T18:34:44Z","receivedAt":"2018-05-10T18:41:50Z","isPatch":false,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 2018-05-09 03:46 PM, Ilya Kantor wrote:\n> I tried to compare --force-rebase VS --no-ff for the following repository:\n> http://jmp.sh/E7TRjcL\n> \n> There's no difference in the resulf of:\n> git rebase --force-rebase 54a4\n> git rebase --no-ff 54a4\n> \n> (rebases all 3 commits of feature)\n> \n> Also, there's no difference in interactive mode:\n> git rebase --force-rebase -i 54a4\n> git rebase --no-ff -i 54a4\n> \n> (picks all 3 commits of feature)\n> \n> Is there a case where --no-ff differs from --force-rebase?\n\nSo now that \"rebase -i\" respects --force-rebase, the question is what to \ndo about it:\n\n1. Teach \"rebase -i\" to stop respecting --force-rebase (restoring the \noriginal intent when --no-ff was introduced)?\n\n2. Deprecate --no-ff?\n\n3. Deprecate --force-rebase?\n\nAs a heavy rebase user, I find --no-ff more intuitive than \n--force-rebase.  I'd be in favour of option 3, and keeping just --no-ff \n(with -f as a synonym).\n\n\t\tM.\n\n\n> ---\n> Best Regards,\n> Ilya Kantor\n> \n> \n> On Wed, May 9, 2018 at 10:27 PM, Marc Branchaud <marcnarc@xiplink.com> wrote:\n>> On 2018-05-09 02:21 PM, Stefan Beller wrote:\n>>>\n>>> +cc Marc and Johannes who know more about rebase.\n>>>\n>>> On Wed, May 9, 2018 at 9:01 AM, Ilya Kantor <iliakan@gmail.com> wrote:\n>>>>\n>>>> Right now in \"git help rebase\" for --no-ff:\n>>>> \"Without --interactive, this is a synonym for --force-rebase.\"\n>>>>\n>>>> But *with* --interactive, is there any difference?\n>>>\n>>>\n>>> I found\n>>>\n>>> https://code.googlesource.com/git/+/b499549401cb2b1f6c30d09681380fd519938eb0\n>>> from 2010-03-24\n>>\n>>\n>> In the original discussion around this option [1], at one point I proposed\n>> teaching rebase--interactive to respect --force-rebase instead of adding a\n>> new option [2].  Ultimately --no-ff was chosen as the better user interface\n>> design [3], because an interactive rebase can't be \"forced\" to run.\n>>\n>> At the time, I think rebase--interactive only recognized --no-ff.  That\n>> might have been muddled a bit in the migration to rebase--helper.c.\n>>\n>> Looking at it now, I don't have a strong opinion about keeping both options\n>> or deprecating one of them.\n>>\n>>                  M.\n>>\n>> [1] https://public-inbox.org/git/4B9FD9C1.9060200@xiplink.com/t/\n>> [2]\n>> https://public-inbox.org/git/1269361187-31291-1-git-send-email-marcnarc@xiplink.com/\n>> [3] https://public-inbox.org/git/7vzl1yd5j4.fsf@alter.siamese.dyndns.org/\n>>\n>>\n>>>       Teach rebase the --no-ff option.\n>>>\n>>>       For git-rebase.sh, --no-ff is a synonym for --force-rebase.\n>>>\n>>>       For git-rebase--interactive.sh, --no-ff cherry-picks all the commits\n>>> in\n>>>       the rebased branch, instead of fast-forwarding over any unchanged\n>>> commits.\n>>>\n>>>       --no-ff offers an alternative way to deal with reverted merges.\n>>> Instead of\n>>>       \"reverting the revert\" you can use \"rebase --no-ff\" to recreate the\n>>> branch\n>>>       with entirely new commits (they're new because at the very least the\n>>>       committer time is different).  This obviates the need to revert the\n>>>       reversion, as you can re-merge the new topic branch directly.  Added\n>>> an\n>>>       addendum to revert-a-faulty-merge.txt describing the situation and\n>>> how to\n>>>       use --no-ff to handle it.\n>>>\n>>> which sounds as if there is?\n>>>\n>>> Stefan\n>>>\n>>\n"},{"id":"347289","messageId":"CAFU8umhU+jOdB=PbrnBx24sizSAp-JeTt8KfvxoM_no0kbDu-A@mail.gmail.com","threadId":"48443","inReplyTo":"bc722982-042a-53cc-e3b3-7c2428952062@xiplink.com","subject":"Re: Is rebase --force-rebase any different from rebase --no-ff?","fromName":"Ilya Kantor","fromEmail":"iliakan@gmail.com","sentAt":"2018-05-10T18:53:29Z","receivedAt":"2018-05-10T18:53:55Z","isPatch":false,"sender":{"key":"iliakan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349336?v=4"},"body":"Hi,\n\nIf that's indeed true (as far as I could see that, still can be\nmistaken), then as a git user, not developer, I'd stick to --no-ff,\nbecause it's the more intuitive naming.\n\nJust 5¢.\n---\nBest Regards,\nIlya Kantor\n\n\nOn Thu, May 10, 2018 at 9:34 PM, Marc Branchaud <marcnarc@xiplink.com> wrote:\n> On 2018-05-09 03:46 PM, Ilya Kantor wrote:\n>>\n>> I tried to compare --force-rebase VS --no-ff for the following repository:\n>> http://jmp.sh/E7TRjcL\n>>\n>> There's no difference in the resulf of:\n>> git rebase --force-rebase 54a4\n>> git rebase --no-ff 54a4\n>>\n>> (rebases all 3 commits of feature)\n>>\n>> Also, there's no difference in interactive mode:\n>> git rebase --force-rebase -i 54a4\n>> git rebase --no-ff -i 54a4\n>>\n>> (picks all 3 commits of feature)\n>>\n>> Is there a case where --no-ff differs from --force-rebase?\n>\n>\n> So now that \"rebase -i\" respects --force-rebase, the question is what to do\n> about it:\n>\n> 1. Teach \"rebase -i\" to stop respecting --force-rebase (restoring the\n> original intent when --no-ff was introduced)?\n>\n> 2. Deprecate --no-ff?\n>\n> 3. Deprecate --force-rebase?\n>\n> As a heavy rebase user, I find --no-ff more intuitive than --force-rebase.\n> I'd be in favour of option 3, and keeping just --no-ff (with -f as a\n> synonym).\n>\n>                 M.\n>\n>\n>> ---\n>> Best Regards,\n>> Ilya Kantor\n>>\n>>\n>> On Wed, May 9, 2018 at 10:27 PM, Marc Branchaud <marcnarc@xiplink.com>\n>> wrote:\n>>>\n>>> On 2018-05-09 02:21 PM, Stefan Beller wrote:\n>>>>\n>>>>\n>>>> +cc Marc and Johannes who know more about rebase.\n>>>>\n>>>> On Wed, May 9, 2018 at 9:01 AM, Ilya Kantor <iliakan@gmail.com> wrote:\n>>>>>\n>>>>>\n>>>>> Right now in \"git help rebase\" for --no-ff:\n>>>>> \"Without --interactive, this is a synonym for --force-rebase.\"\n>>>>>\n>>>>> But *with* --interactive, is there any difference?\n>>>>\n>>>>\n>>>>\n>>>> I found\n>>>>\n>>>>\n>>>> https://code.googlesource.com/git/+/b499549401cb2b1f6c30d09681380fd519938eb0\n>>>> from 2010-03-24\n>>>\n>>>\n>>>\n>>> In the original discussion around this option [1], at one point I\n>>> proposed\n>>> teaching rebase--interactive to respect --force-rebase instead of adding\n>>> a\n>>> new option [2].  Ultimately --no-ff was chosen as the better user\n>>> interface\n>>> design [3], because an interactive rebase can't be \"forced\" to run.\n>>>\n>>> At the time, I think rebase--interactive only recognized --no-ff.  That\n>>> might have been muddled a bit in the migration to rebase--helper.c.\n>>>\n>>> Looking at it now, I don't have a strong opinion about keeping both\n>>> options\n>>> or deprecating one of them.\n>>>\n>>>                  M.\n>>>\n>>> [1] https://public-inbox.org/git/4B9FD9C1.9060200@xiplink.com/t/\n>>> [2]\n>>>\n>>> https://public-inbox.org/git/1269361187-31291-1-git-send-email-marcnarc@xiplink.com/\n>>> [3] https://public-inbox.org/git/7vzl1yd5j4.fsf@alter.siamese.dyndns.org/\n>>>\n>>>\n>>>>       Teach rebase the --no-ff option.\n>>>>\n>>>>       For git-rebase.sh, --no-ff is a synonym for --force-rebase.\n>>>>\n>>>>       For git-rebase--interactive.sh, --no-ff cherry-picks all the\n>>>> commits\n>>>> in\n>>>>       the rebased branch, instead of fast-forwarding over any unchanged\n>>>> commits.\n>>>>\n>>>>       --no-ff offers an alternative way to deal with reverted merges.\n>>>> Instead of\n>>>>       \"reverting the revert\" you can use \"rebase --no-ff\" to recreate\n>>>> the\n>>>> branch\n>>>>       with entirely new commits (they're new because at the very least\n>>>> the\n>>>>       committer time is different).  This obviates the need to revert\n>>>> the\n>>>>       reversion, as you can re-merge the new topic branch directly.\n>>>> Added\n>>>> an\n>>>>       addendum to revert-a-faulty-merge.txt describing the situation and\n>>>> how to\n>>>>       use --no-ff to handle it.\n>>>>\n>>>> which sounds as if there is?\n>>>>\n>>>> Stefan\n>>>>\n>>>\n>\n"}]}