-
Notifications
You must be signed in to change notification settings - Fork 897
Expose a more generic DiffAlgorithm property in CompareOptions #1043
New issue
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
Conversation
Ok, sure, why not |
Ready for review |
public bool UsePatienceAlgorithm { get; set; } | ||
|
||
/// <summary> | ||
/// Algorithm to be used when performing a Diff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Default = Algorithm.Meyers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Other than missing implementation for minimal diff, that's all I can say. |
@Therzok I've been refraining from implementing the Any idea? |
Only seems to do things for big diffs. I just did:
Returned same results until around ~600 commits, and I tracked down what changed the stuff. It seems to be XML that's the culprit of making minimal better, but only in a big diff context. Here's the diff between the two. https://gist.github.com/Therzok/0f1f127ab2c9bb95681b They make chrome choke when trying to gist them: Differences also happen in libgit2sharp repo with ~300 commits from HEAD.
|
In short it only affects huge diffs. This would be useful for someone diffing HEAD to 1 year prior, but not many people do this. So it would be best to keep it. Short things short: minimal is just myers with better diffs for huge stuff. Edit: The time difference is actually not noticeable. |
Expose a more generic DiffAlgorithm property in CompareOptions
Published as NuGet pre-release package |
Following #1039 and in order to avoid future breaking changes maybe would it be wise to expose a property accepting an enum of Diff algorithms (Meyer, Minimal, ...).
/cc @dmalikov