paulfitz / daff

align and compare tables
https://paulfitz.github.io/daff
MIT License
801 stars 67 forks source link

Moved duplicate line appears as added and removed in --unordered mode #123

Open vachigaggl opened 6 years ago

vachigaggl commented 6 years ago

I'm not sure that this is an entirely new problem, but I couldn't find such a clear example in other similar issues like #91. Consider this example made using daff-1.3.36 (python):

$ cat duplicates1.csv 
col1,col2,col3
1,0,0
2,0,0
1,0,0
2,0,0

$ cat duplicates2.csv 
col1,col2,col3
1,0,0
1,0,0
2,0,0
2,0,0

$ daff diff --unordered --id col1 duplicates1.csv duplicates2.csv 
@@ ,col1,col2,col3
---,2   ,0   ,0
+++,2   ,0   ,0

$ daff diff --unordered duplicates1.csv duplicates2.csv 
@@ ,col1,col2,col3
---,2   ,0   ,0
+++,2   ,0   ,0

My expectation was that daff diff --undordered duplicates1.csv duplicates2.csv shows no differences.

koenvb commented 5 years ago

Have you ever found a solution for this issue? I am facing a similar issue?

rairulyle commented 5 years ago

Same issue as well.