On 31/10/2015 01:51, Guillaume Hoffmann wrote:
>
> Guillaume Hoffmann <guillaumh@gmail.com> added the comment:
>
> First 3 patches look good. So the idea is that the last patch introduces
> the MightHaveDuplicate and MightBeEmptyHunk type classes to avoid
> running tests on cases where they do not make sense.
>
> Tests that are affected are in Generic.hs:
>
> * recommute: not run if one of the patches is a duplicate. Why? Because
> a duplicate patch has no effect, hence commuting it neither?
In principle this test should pass, but in practice we know that there
are problems with duplicates in V2 conflict patches, and we don't have
any realistic hope of fixing them. So it seems simpler to just give up
on testing them too.
> Why does not the 'hasDuplicate' tests occur earlier in the function?
I think the duplicates appear after the merge operation, rather than in
the original patches.
Let me know if I can improve the comments in the code to make this
clearer (or of course if you disagree with the approach).
Cheers,
Ganesh
|