Skip to content

Expose the Minimal diff algorithm #1227

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

Merged
merged 1 commit into from
Nov 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions LibGit2Sharp/Diff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ private static GitDiffOptions BuildOptions(DiffModifiers diffOptions, FilePath[]
{
options.Flags |= GitDiffOptionFlags.GIT_DIFF_PATIENCE;
}
else if (compareOptions.Algorithm == DiffAlgorithm.Minimal)
{
options.Flags |= GitDiffOptionFlags.GIT_DIFF_MINIMAL;
}

if (diffOptions.HasFlag(DiffModifiers.DisablePathspecMatch))
{
Expand Down
5 changes: 5 additions & 0 deletions LibGit2Sharp/DiffAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ public enum DiffAlgorithm
/// </summary>
Meyers = 0,

/// <summary>
/// Use "minimal diff" algorithm when generating patches.
/// </summary>
Minimal = 1,

/// <summary>
/// Use "patience diff" algorithm when generating patches.
/// </summary>
Expand Down