From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
To: Elijah Newren <newren@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Confusing (maybe wrong?) conflict output with ort
Date: Thu, 02 Dec 2021 19:40:10 -0500 [thread overview]
Message-ID: <1638491699.9sjos0rkh4.none@localhost> (raw)
In-Reply-To: <CABPp-BEyy97x-9od+9E9DxCDHHq-m8hyZJWqxFutkRy3G7Hu9g@mail.gmail.com>
Excerpts from Elijah Newren's message of December 2, 2021 6:58 pm:
> Hi,
>
> On Thu, Dec 2, 2021 at 11:08 AM Alex Xu (Hello71) <alex_y_xu@yahoo.ca> wrote:
>>
>> Hi all,
>>
>> After upgrading to git 2.34.1, I tried to rebase [0] onto [1], but
>> encountered "strange" conflict results.
>>
>> git rebase -s recursive main produces [[RECURSIVE]]. It is roughly what
>> I expected to be output. If I take all the changes from the upper
>> section of the conflict, my changes will be effectively undone. If I
>> take all the changes from the lower section, then the upstream changes
>> will be undone.
>
> In general, this does not work. The only time it can work is if every
> region of the code considered by the three-way content merge ended up
> with conflicts. (If any of those regions had automatically resolvable
> changes, then after taking just the upper section(s) or just the lower
> section(s) of each conflict would still result in a file that is a
> mixture of changes from both sides due to the automatically resolvable
> chunks that the merge already handled.)
>
>> On the other hand, running git rebase -s ort main produces [[ORT]]. I am
>> unsure if it is wrong, strictly speaking, but it is certainly unexpected
>> and difficult for me to resolve. Selecting the upper section of the
>> conflict does erase my changes, as before, but selecting the lower
>> section results in syntactically incorrect code (foreach is ended by
>> endif). The diff3 output makes even less sense to me.
>
> The output from using ort is identical to that obtained by
>
> git rebase -s recursive -Xdiff-algorithm=histogram ...
>
> on your testcase; i.e. this is due to a difference between the
> histogram and myers diff algorithms.
> (recursive defaults to using myers diff; ort uses histogram diff.)
[ ... ]
> Does that help explain things?
Hm, I did try both default and patience and it didn't make a difference.
git rebase -s recursive -Xdiff-algorithm=histogram master does produce
the same result as ort though. I probably should have tried that first.
Thanks for the explanation though, that's very helpful!
Cheers,
Alex.
prev parent reply other threads:[~2021-12-03 0:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1638470726.ql5i6zljva.none.ref@localhost>
2021-12-02 19:08 ` Confusing (maybe wrong?) conflict output with ort Alex Xu (Hello71)
2021-12-02 23:58 ` Elijah Newren
2021-12-03 0:40 ` Alex Xu (Hello71) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1638491699.9sjos0rkh4.none@localhost \
--to=alex_y_xu@yahoo.ca \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.