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.