Closed tripolskypetr closed 5 years ago
It's not a bug but expected behavior.
A diff with unified format is represented as a set of chunk and each chunk has common sequences up to N(>=0). N in dtl is 3. It's fixed.
FYI, GNU diffutils has the feature to change this number.
$ diff --help | grep "\-U"
-u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified context.
@cubicdaiya wrote:
A diff with unified format is represented as a set of chunk and each chunk has common sequences up to N(>=0). N in dtl is 3. It's fixed.
My PR #5, now enables the user to specify N, say 5, instead of the default 3:
d.composeUnifiedHunks(5);
Steps to reproduce:
Output:
Does anyone know why the first element 'a' is not defined as common to sequences? Is there any way around this mistake without losing performance?