We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steps to reproduce:
#include "3rdparty/dtl/dtl.hpp" #include <iostream> #include <vector> int main(int argc, char *argv[]) { std::vector<char> a = {'a','b','c','d'}; std::vector<char> b = {'a','b','c','d','e','f'}; std::cout << "a: " << "abcd" << "\n"; std::cout << "b: " << "abcdef" << "\n"; dtl::Diff<char,std::vector<char>> d(b,a); d.compose(); d.onHuge(); d.composeUnifiedHunks(); d.printUnifiedFormat(); return 0; }
Output:
a: abcd b: abcdef @@ -2,5 +2,3 @@ b c d -e -f
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?
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
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:
My PR #5, now enables the user to specify N, say 5, instead of the default 3: d.composeUnifiedHunks(5);
d.composeUnifiedHunks(5);
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: