git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pull: conflict hint pull.rebase suggestion should offer "merges" vs "true"

From
Tao Klerks <tao@klerks.biz>
Date
Feb 17, 2023, 11:15 UTC
Message-ID
<CAPMMpoj0Ts=c=Wq1eghjJ75HVyy5ZyKjL3o9=AB8SDb5Wf99mw@mail.gmail.com>
In-Reply-To
<CAMMLpeTQ1RpsvwRdZ0G3wdvH1+LXE5tw=7Cs6Q+HxMcRU0qj5Q@mail.gmail.com>
On Fri, Feb 17, 2023 at 4:15 AM Alex Henrie <alexhenrie24@gmail.com> wrote:
>
> I would be OK with the proposed patch if it were part
> of a larger effort to make --rebase-merges the default behavior of
> `git rebase`.

Heh, what would it take to convince you there is such an effort? :) - sparse and minor as my contributions are, I certainly believe that is a "natural" effort that I will do what I can to support.

> That seems like an achievable goal, and I don't think it
> would take multiple years, maybe one year at the most.

My estimate is based on the observation that there are still, several years after --rebase-merges was introduced, git GUIs that don't handle it right - eg Jetbrains IDEA: https://youtrack.jetbrains.com/issue/IDEA-232160/Rebase-merges-is-not-properly-supported

This kind of functionality change should be slow, not because it's a huge amount of work, but more because it takes time for the entire ecosystem to adapt. Git releases basically-monthly, but many of the systems that users use git with release far less often; similarly, it's helpful to users who use a mix of current and older systems (I'm looking at you, CentOS 7) for the introduction and recommendation of a behavior change to come *long* before its defaulting.

Show 6 quoted lines
> The process
> would look something like this:
>
> 1. Add a --no-rebase-merges option to `git rebase`.
>
> 2. Add a rebase.merges config option.

Yes and yes! I alluded to this in https://lore.kernel.org/git/CAPMMpoj6E-85a59EaHD2aR_oKA=_u78qRV+wp8mqXkR39KctmA@mail.gmail.com/ but didn't feel I'd likely to make a solid change along these lines.

Show 7 quoted lines
>
> 3. Add a warning to `git rebase` that appears if rebase.merges is
> unset and neither --rebase-merges nor --no-rebase-merges is given. The
> warning would advise the user that the default behavior of `git
> rebase` will change in a future release and suggest setting
> rebase.merges=no-rebase-cousins to get the new behavior now.
>
Makes sense to me!
> 4. Change the `git pull` advice to recommend --rebase=merges and
> pull.rebase=merges.
>

I'm not sure why this would be step 4 - I would (and did try to) make it step 1 :)

> 5. Wait a couple of releases.
>
As I noted above, I believe it should be far more than a couple.
Show 6 quoted lines
> 6. Change the default behavior of `git rebase` to `git rebase
> --rebase-merges` and the default behavior of `git pull --rebase` to
> `git pull --rebase=merges`. At the same time, remove the warning from
> `git rebase`. The old `git pull` behavior would still be available as
> `git pull --rebase=true`.
>
Makes sense to me!
Show 6 quoted lines
> 7. Change the `git pull` advice to recommend the short and simple
> --rebase option again (leaving the recommendation of
> pull.rebase=merges for the config option).
>
> Does that sound reasonable? I think I could lend a hand with steps 1-3.
>

I'm sold, except insofar as I think the right approach is to move step 4 to be the first :)

Previous: Alex HenrieNext: Alex Henrie
Message 5 of 34 in “pull: conflict hint pull.rebase suggestion should offer "merges" vs "true"”
  1. pull: conflict hint pull.rebase suggestion should offer "merges" vs "true"Tao Klerks via GitGitGadget, Feb 5, 2023
  2. Alex HenrieFeb 16, 2023
  3. Tao KlerksFeb 16, 2023
  4. Alex HenrieFeb 17, 2023
  5. Tao KlerksFeb 17, 2023
  6. Alex HenrieFeb 17, 2023
  7. Junio C HamanoFeb 17, 2023
  8. Elijah NewrenFeb 18, 2023
  9. Phillip WoodFeb 18, 2023
  10. Tao KlerksFeb 20, 2023
  11. Phillip WoodFeb 20, 2023
  12. Elijah NewrenFeb 20, 2023
  13. Tao KlerksFeb 21, 2023
  14. Sergey OrganovFeb 22, 2023
  15. Elijah NewrenFeb 24, 2023
  16. Sergey OrganovFeb 24, 2023
  17. Elijah NewrenFeb 24, 2023
  18. Sergey OrganovFeb 25, 2023
  19. Elijah NewrenFeb 25, 2023
  20. Sergey OrganovFeb 26, 2023
  21. Elijah NewrenFeb 27, 2023
  22. Sergey OrganovFeb 27, 2023
  23. Elijah NewrenFeb 28, 2023
  24. Elijah NewrenFeb 20, 2023
  25. Tao KlerksFeb 20, 2023
  26. Elijah NewrenFeb 20, 2023
  27. Alex HenrieFeb 20, 2023
  28. Tao KlerksFeb 21, 2023
  29. Alex HenrieFeb 21, 2023
  30. Tao KlerksFeb 21, 2023
  31. Elijah NewrenFeb 24, 2023
  32. Felipe ContrerasFeb 28, 2023
  33. Alex HenrieFeb 28, 2023
  34. Felipe ContrerasMar 1, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.