GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Add support for git diff --indent-heuristic option by jcansdale · Pull Request #1652 · libgit2/libgit2sharp Conversation
|
| ContentChanges changes0 = repo.Diff.Compare(oldBlob, newBlob, noIndentHeuristicOption); | ||
| ContentChanges changes1 = repo.Diff.Compare(oldBlob, newBlob, indentHeuristicOption); | ||
|
|
||
| Assert.NotEqual(changes0.Patch, changes1.Patch); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can we validate that changes0 is a superset of changes1?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Or validate the results of the patch strings?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about what exactly to validate in this case. The main thing I wanted to validate was that the flag was making its way to indent heuristic code. By checking when we expect the flag to make a difference and when we don't expect it to make a difference, I hope that is pretty much covered.
I've added a sanity check in 2f583cb to make sure that the same lines are being added or removed. I'm trusting the algorithm to add or remove them in the correct order. 🙂
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The --indent-heuristic option should create patches that add or remove the same lines, but potentially in a different order.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.