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

Re: git-rebase produces incorrect output

From
Elijah Newren <newren@gmail.com>
Date
Nov 30, 2019, 16:37 UTC
Message-ID
<CABPp-BHPkwnbLR0xNaY3SphCpmR6QRA1j953c2hU7ZFpL38Nig@mail.gmail.com>
In-Reply-To
<CABPp-BGiu2nVMQY_t-rnFR5GQUz_ipyEE8oDocKeO+h+t4Mn4A@mail.gmail.com>
On Fri, Nov 29, 2019 at 8:22 PM Elijah Newren <newren@gmail.com> wrote:
> On Fri, Nov 29, 2019 at 12:24 AM Pavel Roskin <plroskin@gmail.com> wrote:
Show 20 quoted lines
> So, to summarize here:
>   * you have a case where the default 3 lines of context mess stuff
> up; but rebase --merge works great
>   * am doesn't have a -U option, and ignores the diff.context setting,
> making it impossible to force the am backend to work on your case
>   * rebase doesn't have an option to use the merge/interactive backend
> by default (nor an --am option to override it)
>
> Also:
>   * The performance of the merge/interactive backend is slightly
> better than the am-backend
> (https://public-inbox.org/git/CABPp-BF=ev03WgODk6TMQmuNoatg2kiEe5DR__gJ0OTVqHSnfQ@mail.gmail.com/)
> and will continue to get better
>   * The merge/interactive backend supports many more options than the
> am-backend, though the am one still has a few the merge backend
> doesn't.  Once the ra/rebase-i-more-options topic merges, --whitespace
> will be the only consequential option that the am-backend supports
> that the merge/interactive-backend doesn't.  (There's also -C, but as
> noted above, the merge/interactive backend already have access to the
> full file).

In case it wasn't clear above, the merge/interactive backend could just accept the -C option and ignore it and do nothing, since it already has access to the full file (thus why I consider the -C option to not be consequential).

Also, I remembered and dug out a few more items about the default
rebase backend that might be worth including in this summary:
  * The am backend operates with incomplete tree information as well,
limiting what the merge/resolve/whatever can do and what information
can be provided to the user (see
https://public-inbox.org/git/xmqqh8jeh1id.fsf@gitster-ct.c.googlers.com/)
  * The interactive backend, although slightly faster than the
am-backend (on p3400 at least), is slightly slower with split-index
which hasn't yet been investigated (see
https://public-inbox.org/git/nycvar.QRO.7.76.6.1901312310280.41@tvgsbejvaqbjf.bet/)
> Maybe we should just switch the default, for everyone?  (And provide
> an --am option to override it and a config setting to get the old
> default?)

CC'ing a few folks for opinions on switching the default backend of rebase from --am to --merge. Johannes already agreed it was the right path eventually[1], and Junio suggested the am backend should be deprecated[2] and eventually replaced, so I was going to push on this after some merge performance work but perhaps it's a good time to query if it's time to switch the default sooner.

[1] See the end of https://public-inbox.org/git/nycvar.QRO.7.76.6.1808311158540.71@tvgsbejvaqbjf.bet/, also linked above. [2] https://public-inbox.org/git/xmqqh8jeh1id.fsf@gitster-ct.c.googlers.com/, also linked above.

Previous: Elijah NewrenNext: Junio C Hamano
Message 5 of 6 in “git-rebase produces incorrect output”
  1. Pavel RoskinNov 29, 2019
  2. Philip OakleyNov 29, 2019
  3. Pavel RoskinNov 29, 2019
  4. Elijah NewrenNov 30, 2019
  5. Elijah NewrenNov 30, 2019
  6. Junio C HamanoNov 30, 2019

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.