# # # patch "diff_patch.cc" # from [329d20d3cb5f1a7b67ef62ce5583f919285f76d5] # to [cf2d7cc5e009af8cb256384d9ff70ec8d537b3df] # # patch "tests/test_a_merge_8/__driver__.lua" # from [28fe384bfae0e6fea7e9ad46f1db5788c158ba13] # to [35e5153917fae9e3c441f96967191706291c24bc] # ============================================================ --- diff_patch.cc 329d20d3cb5f1a7b67ef62ce5583f919285f76d5 +++ diff_patch.cc cf2d7cc5e009af8cb256384d9ff70ec8d537b3df @@ -235,6 +235,11 @@ void normalize_extents(vector & swap(a_b_map.at(j-1).len, a_b_map.at(j).len); swap(a_b_map.at(j-1).type, a_b_map.at(j).type); + + // Adjust position of the later, preserved extent. It should + // better point to the second 'a' in the above example. + a_b_map.at(j).pos = a_b_map.at(j-1).pos + a_b_map.at(j-1).len; + --j; } } ============================================================ --- tests/test_a_merge_8/__driver__.lua 28fe384bfae0e6fea7e9ad46f1db5788c158ba13 +++ tests/test_a_merge_8/__driver__.lua 35e5153917fae9e3c441f96967191706291c24bc @@ -27,5 +27,6 @@ check(mtn("update"), 0, false, false) check(mtn("update"), 0, false, false) +-- was [bug #18989] merge failure +check(samefile("testfile", "correct")) + --- triggers [bug #18989] merge failure -xfail(samefile("testfile", "correct"))