Re: Bug in merge-ort (rename detection can have collisions?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Elijah, your explanation is really great :)
This looks like a pretty nasty bug. Ugh..

Elijah Newren <newren@xxxxxxxxx> writes:

> On Fri, Jun 10, 2022 at 9:53 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>
>> Elijah Newren <newren@xxxxxxxxx> writes:
>>
>> > On Tue, Jun 7, 2022 at 5:11 PM Glen Choo <chooglen@xxxxxxxxxx> wrote:
>> >>
>> >> (I'm not 100% what the bug _is_, only that there is one.)
>> >>
>> >> = Report
>> >>
>> >> At $DAYJOB, there was a report that "git merge" was failing on certain
>> >> branches. Fortunately, the repo is publicly accessible, so I can share
>> >> the full reproduction recipe:
>> >> ...
>> > Thanks for the detailed report; very cool.  Interestingly, if you
>> > reverse the direction of the merge (checkout origin/upstream-master
>> > and merge origin/master) then you get a different error:
>> > ...
>> > Anyway, long story short...I don't have a fix yet, but just thought
>> > I'd mention I saw the email and spent some hours digging in.
>>
>> Thanks for continued support for the ort strategy.  From the very
>> beginning, I was hesitant to make our tools try to be too clever
>> with excessive heuristics, but at least we are not making a silent
>> mismerge in this case, so it is probably OK, especially with "-s
>> recursive" still left as an escape hatch.
>
> In fact, the more general problem area here appears to affect the
> recursive strategy as well.  I'm glad the specific testcase reported
> works under recursive and gave Glen (or his user) a workaround, but
> that feels like luck rather than design because my minimal
> reproduction testcase not only triggers the same issue he saw with the
> ort strategy, but also triggers a previously unknown fatal bug in the
> recursive strategy too.

Yeah, hm. I was surprised that we encountered this bug at all, but it's
not so surprising after seeing how many edge conditions this bug
contains.

I wonder if there other rename detection bugs lurking beyond the
horizon, whether we already assume that these bugs exist, and if so,
whether we should officially document "merge without rename detection"
as a workaround [1].

[1] Assuming that the workaround works of course. I tried to disable
rename detection several times, but I couldn't really figure out whether
I did it correctly or whether it fixed the bug (which is why I didn't
include it in the initial report.)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux