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

Re: Defaulting --rebase-merges overall?

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2023, 21:09 UTC
Message-ID
<xmqqa61uo3q0.fsf@gitster.g>
In-Reply-To
<CAPMMpoj6E-85a59EaHD2aR_oKA=_u78qRV+wp8mqXkR39KctmA@mail.gmail.com>
Tao Klerks <tao@klerks.biz> writes:
Show 8 quoted lines
> 1. Change the "Need to specify how to reconcile divergent branches"
> pull conflict hint text to offer "git config pull.rebase merges"
> instead of "git config pull.rebase true"
> ...
> As I think about it, the global option sounds like it might be hard to
> prove the correctness of (and compatibility with the hosts of other
> options), so I probably won't be qualified to do this. Is there any
> objection to the simple hint change, at least?

I think suggesting "[pull] rebase = merges" is more in line with the original spirit of suggesting "you want to recreate your work on top of the updated upstream".

I do not particularly find it a good idea to suggest configuring "git pull" to always rebase (whether it rebases with mergesor flattens) in the first place, but if we were to offer such an option anyway, "merges" is a much better choice than "true" to flatten, simply because that matches the goal of "to recreate your work on top of the updated upstream" better.

The only reason why 'true' is in the suggestion is because 'merges' came much later than "when tried to pull and got a conflict, you'd rebuild your work on top of theirs" suggestion was introduced.

Previous: Tao Klerks
Message 2 of 2 in “Defaulting --rebase-merges overall?”
  1. Tao KlerksFeb 3, 2023
  2. Junio C HamanoFeb 3, 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.