bmwill / diffy

Tools for finding and manipulating differences between files
Apache License 2.0
75 stars 22 forks source link

Invalid output for deletion / insertion conflict #28

Closed wetneb closed 4 months ago

wetneb commented 4 months ago

Consider the following merge scenario:

Ancestor

{
    int a = 2;
}

Ours

{
}

Theirs

{
    int a = 2;
    int b = 3;
}

Current diffy merge output

Successful merge without any conflict:

{
}

Expected merge output

Conflicting merge:

{
<<<<<<< ours
||||||| ancestor
    int a = 2;
=======
    int a = 2;
    int b = 3;
>>>>>>> theirs
}

One can check that git merge-file -p /tmp/ours /tmp/ancestor /tmp/theirs indeed produces the output above.

bmwill commented 4 months ago

Thanks for the bug report! I'll try to dig into the root cause.

bmwill commented 4 months ago

Fixed by #30