{"thread":{"id":"58546","subject":"Bug report","startedAt":"2022-10-03T15:28:24Z","lastAt":"2022-10-05T05:46:50Z","messageCount":5,"participants":["Alastair Douglas","Junio C Hamano","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"464077","messageId":"CADTs3HEn8JQzfWGP-rq_BBLvwGD163=c2i_7vFK17g+wAVec+Q@mail.gmail.com","threadId":"58546","inReplyTo":null,"subject":"Bug report","fromName":"Alastair Douglas","fromEmail":"alastair.douglas@gmail.com","sentAt":"2022-10-03T15:28:06Z","receivedAt":"2022-10-03T15:28:24Z","isPatch":false,"sender":{"key":"alastair.douglas@gmail.com","avatar":null},"body":"I have found no solution to the issue below. Apologies if it has\nalready been addressed.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nHave an existing git config with rebase = preserve\n\nWhat did you expect to happen? (Expected behaviour)\n\nMerges to be preserved when rebasing, without a warning about an option I am\nnot using.\n\nWhat happened instead? (Actual behaviour)\n\nI received a warning as though I had used the option on the command line:\n\nwarning: git rebase --preserve-merges is deprecated. Use\n--rebase-merges instead.\n\nI didn't do that, so I can't follow the advice. There appears to be no\nalternative config setting for the new option.\n\nWhat's different between what you expected and what actually happened?\n\nI expected rebase=preserve to now use --rebase-merges instead of\n--preserve-merges, or for a new config setting to be made available to use\n--rebase-merges. Ideally the first, because the semantics are clear.\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.34.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC\n2022 x86_64\ncompiler info: gnuc: 11.2\nlibc info: glibc: 2.35\n$SHELL (typically, interactive shell): /usr/bin/zsh\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n"},{"id":"464086","messageId":"xmqqill0voft.fsf@gitster.g","threadId":"58546","inReplyTo":"CADTs3HEn8JQzfWGP-rq_BBLvwGD163=c2i_7vFK17g+wAVec+Q@mail.gmail.com","subject":"Re: Bug report","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-10-03T16:53:26Z","receivedAt":"2022-10-03T16:53:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alastair Douglas <alastair.douglas@gmail.com> writes:\n\n> I have found no solution to the issue below. Apologies if it has\n> already been addressed.\n\nThanks for a report.  \n\nThe solution is to remove \"[pull] rebase = preserve\" and replace it\nwith \"[pull] rebase = merges\", I think.\n\n\n> What did you do before the bug happened? (Steps to reproduce your issue)\n>\n> Have an existing git config with rebase = preserve\n>\n> What did you expect to happen? (Expected behaviour)\n>\n> Merges to be preserved when rebasing, without a warning about an option I am\n> not using.\n>\n> What happened instead? (Actual behaviour)\n>\n> I received a warning as though I had used the option on the command line:\n>\n> warning: git rebase --preserve-merges is deprecated. Use\n> --rebase-merges instead.\n>\n> I didn't do that, so I can't follow the advice. There appears to be no\n> alternative config setting for the new option.\n\nIt sounds like splitting hairs, but I agree that the message is\nmisleading.  I think whoever wrote the message meant that \"the\nfeature that is triggered by giving the --preserve-merges option to\nthe command\" was deprecated.  IOW, they did not mean that only the\ncommand line option was depreated, implying that it is not\ndeprecated to trigger the same feature by setting a configuration\nvariable.  Both forms of the use of the same feature was deprecated\nabout the same time.\n\nI also suspect that they were hoping that the users will read the\ninstruction based on these command line options and understand that\nit also applies to the configuration variables.\n\n"},{"id":"464117","messageId":"CADTs3HFZjX7P=n3PpjAtt=6E9m3PUgFKXksZKuOY4t71hSSnrw@mail.gmail.com","threadId":"58546","inReplyTo":"xmqqill0voft.fsf@gitster.g","subject":"Re: Bug report","fromName":"Alastair Douglas","fromEmail":"alastair.douglas@gmail.com","sentAt":"2022-10-04T10:15:53Z","receivedAt":"2022-10-04T10:16:17Z","isPatch":false,"sender":{"key":"alastair.douglas@gmail.com","avatar":null},"body":"On Mon, 3 Oct 2022 at 17:53, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Alastair Douglas <alastair.douglas@gmail.com> writes:\n>\n> > I have found no solution to the issue below. Apologies if it has\n> > already been addressed.\n>\n> Thanks for a report.\n>\n> The solution is to remove \"[pull] rebase = preserve\" and replace it\n> with \"[pull] rebase = merges\", I think.\n>\n\nThanks for this reply. This seems to have worked, since I got no warning.\n\nNow that I know it is a new option to the rebase setting I have found\nit in the documentation:\n\nbranch.<name>.rebase\n...\n  When merges, pass the --rebase-merges option to git rebase so that\nthe local merge commits are included in the rebase (see git-rebase(1)\nfor details).\n  When preserve (deprecated in favor of merges), also pass\n--preserve-merges along to git rebase so that locally committed merge\ncommits will not be flattened by running git pull.\n\nIt does seem like nobody else on the internet is aware of this, since\nI didn't discover this by Googling it.\n\n> I also suspect that they were hoping that the users will read the\n> instruction based on these command line options and understand that\n> it also applies to the configuration variables.\n>\n\nI understood immediately that it applied to the config, but I couldn't\nfind a single thing about what I *should* have done until you told me\nhere.\n\nHaving said all this, I am fairly sure that I checked the\ndocumentation for the rebase config and failed to spot that new part,\nso I am not blameless myself! I feel like *something* could be updated\nto point in the right direction, but I really don't know what.\nYesterday, I genuinely thought there was no replacement config for the\ndeprecated one!\n\nThanks for your time, but I suppose, in conclusion, there's not a lot\nto be done.\n"},{"id":"464195","messageId":"4e457155-38d2-4d34-2240-0d2f103004a1@iee.email","threadId":"58546","inReplyTo":"CADTs3HFZjX7P=n3PpjAtt=6E9m3PUgFKXksZKuOY4t71hSSnrw@mail.gmail.com","subject":"Re: Bug report [die() preserve-merges messages]","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2022-10-04T16:53:47Z","receivedAt":"2022-10-04T16:53:56Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi Alastair,\n\nOn 04/10/2022 11:15, Alastair Douglas wrote:\n> On Mon, 3 Oct 2022 at 17:53, Junio C Hamano <gitster@pobox.com> wrote:\n>> Alastair Douglas <alastair.douglas@gmail.com> writes:\n>>\n>>> I have found no solution to the issue below. Apologies if it has\n>>> already been addressed.\n>> Thanks for a report.\n>>\n>> The solution is to remove \"[pull] rebase = preserve\" and replace it\n>> with \"[pull] rebase = merges\", I think.\n>>\n> Thanks for this reply. This seems to have worked, since I got no warning.\n>\n> Now that I know it is a new option to the rebase setting I have found\n> it in the documentation:\n>\n> branch.<name>.rebase\n> ...\n>   When merges, pass the --rebase-merges option to git rebase so that\n> the local merge commits are included in the rebase (see git-rebase(1)\n> for details).\n>   When preserve (deprecated in favor of merges), also pass\n> --preserve-merges along to git rebase so that locally committed merge\n> commits will not be flattened by running git pull.\n>\n> It does seem like nobody else on the internet is aware of this, since\n> I didn't discover this by Googling it.\n>\n>> I also suspect that they were hoping that the users will read the\n>> instruction based on these command line options and understand that\n>> it also applies to the configuration variables.\n>>\n> I understood immediately that it applied to the config, but I couldn't\n> find a single thing about what I *should* have done until you told me\n> here.\n>\n> Having said all this, I am fairly sure that I checked the\n> documentation for the rebase config and failed to spot that new part,\n> so I am not blameless myself! I feel like *something* could be updated\n> to point in the right direction, but I really don't know what.\n> Yesterday, I genuinely thought there was no replacement config for the\n> deprecated one!\n>\n> Thanks for your time, but I suppose, in conclusion, there's not a lot\n> to be done.\n\nEarlier this year, I tried to update the error messages to catch the\nvarious ways that the removal of 'preserve-merges' could be confusing to\nusers, based on a Git for Windows user's report [1,2].\n\nIt is rare for a method to be removed, so there was little experience of\nhow best to handle all the different use cases.\n\nIn general, the approach was to ensure that users could not fail to\nnotice that something had changed, or needed to be changed. The problem\nwith 'preserve-merges' being that there were scenarios where the code\ndid the wrong thing and users were not noticing, and further it wasn't\nclear to users which case that was, nor how to explain it, given the\nmind-set confusions!\n\nIn general Git avoids rolling over old options to new variants, without\nnotification, if they do different things. It would have been nice to\ncover more use cases, but often the cause was not known at the point the\nproblem was detected in the code, as you have seen.\n\nIt was expected that users should have been aware of their own\nconfiguration settings, though that's not always true (see the mailing\nlist discussions).\n\nPhilip\n\n[1]\nhttps://lore.kernel.org/git/pull.1155.git.1645526016.gitgitgadget@gmail.com/\n Subject: [PATCH 0/2] Update the die() preserve-merges messages to help\nsome users   22 Feb 2022\n[2]\nhttps://lore.kernel.org/git/pull.1242.v2.git.1654341469.gitgitgadget@gmail.com/\nSubject: [PATCH v2 0/4] Die preserve ggg   04 Jun 2022\n"},{"id":"464216","messageId":"xmqq8rlustz0.fsf@gitster.g","threadId":"58546","inReplyTo":"CADTs3HFZjX7P=n3PpjAtt=6E9m3PUgFKXksZKuOY4t71hSSnrw@mail.gmail.com","subject":"Re: Bug report","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-10-05T05:46:43Z","receivedAt":"2022-10-05T05:46:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alastair Douglas <alastair.douglas@gmail.com> writes:\n\n> ... I feel like *something* could be updated\n> to point in the right direction, but I really don't know what.\n\nYes, I shared the exact feeling.  Perhaps the message could have\nbeen a bit more helpful by referring to configuration variables that\nare potentially relevant.\n\nThanks.\n\n\n"}]}