CM6: Several conflict gutter markers placed on the same line
HaudinFlorence opened this issue · 8 comments
Well, I am not sure if the issue is in the gutter code or in the chunking algorithm. In this case we get 6 conflict chunks:
And two of them have remoteFrom: 4
(so start at line 5, and the second of these leads to overhanging into line 6).
The also seem essentially identical:
First copy | Second copy |
---|---|
![]() |
![]() |
Is there any case when duplicate chunks are expected, or is this an error in chunking code?
There does seem to be a regression here compared to CM5 version. See this example diffing the files in ui-test/data/merge_test1:
Notice the extra arrow on the base version on line 5. You can also see the same for CM6 here:
Yes, but it is not a bug in CM6 but a bug in how the chunks are calculated as per my comments above.
Of course it still should be fixed, which may be best approached by writing a test case, but it may require more thought/context to understand why the chunking algorithm sometimes leads to duplicate chunks; or we could just add a simple workaround of de-duplicating them without worrying about the algorithm being occasionally wrong.
To clarify, I am using CM5/CM6 as a shorthand for "current stable release" vs "current RC".
(and while there are for sure some bugs in the current stable version's mergeview chunking algorithm, the one I point out above is a new bug in the RC version)