-
Notifications
You must be signed in to change notification settings - Fork 899
PatienceAlgorithm flag in CompareOptions #1039
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
Do we need some tests here? I'm not quite sure what is the best approach to verify whether particular diff is patience or not. |
Indeed, we tend to prefer covering features with tests. The easiest way to make this happen would be to
|
What do you mean by |
|
@nulltoken is there some helper method to parse |
@dmalikov No. you'll have to build one If you've found a way to identify a small case where |
FWIW, I've found a short example that should be sufficient from a test coverage perspective |
The following code will create a var content = "My content";
var path = "file.txt";
var td = new TreeDefinition();
td.Add(path, OdbHelper.CreateBlob(repo, content), Mode.NonExecutableFile);
var t = repo.ObjectDatabase.CreateTree(td); |
Well, the problem is not to build 2 trees and calculate a diff between Regular diff and patience diff are almost always identical in terms of On 5 May 2015 at 21:09, nulltoken [email protected] wrote:
|
@dmalikov Oh, sorry! I misunderstood your question. You may be willing to actually leverage |
Thanks for examples, test is added |
string repoPath = InitNewRepository(); | ||
using (var repo = new Repository(repoPath)) | ||
{ | ||
Func<string, Tree> fromString = s => repo.ObjectDatabase.CreateTree(new TreeDefinition().Add("file.txt", OdbHelper.CreateBlob(repo, s), Mode.NonExecutableFile)); |
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.
Can you please wrap this line so that it reads better on GitHub (without having to scroll horizontally)?
@nulltoken updated |
@dmalikov Awesome! Last request: Could you please squash those commits together into a single cohesive one? |
6747b5e
to
70d1439
Compare
@nulltoken squashed |
PatienceAlgorithm flag in CompareOptions
✨ ✨ ✨ ✨ ✨ ✨ Very cool contribution! Thanks a lot! |
@nulltoken could you please build a new version of the NuGet package and upload it? |
@dmalikov Sir! Done, Sir! 😉 Published as NuGet pre-release package |
Thanks! On 9 May 2015 at 13:18, nulltoken [email protected] wrote:
|
Fix #1037