diff options
author | Tom Smith <tom.smith@red-gate.com> | 2015-11-04 00:00:48 +0300 |
---|---|---|
committer | Tom Smith <tom.smith@red-gate.com> | 2015-11-04 12:40:24 +0300 |
commit | 6cad2ee56c8f2bb501a25f6b566ea1332f6948db (patch) | |
tree | 0c4a0a46d9bded09dbdb50599ae9f981eee7978b | |
parent | 3aadd4a7b622eea6f7a2519f2b9f372dad4bcc03 (diff) |
Add minimal diff algorithm to API and use it when set on options
-rw-r--r-- | LibGit2Sharp/Diff.cs | 4 | ||||
-rw-r--r-- | LibGit2Sharp/DiffAlgorithm.cs | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/LibGit2Sharp/Diff.cs b/LibGit2Sharp/Diff.cs index d18b6b0f..88c1fdcf 100644 --- a/LibGit2Sharp/Diff.cs +++ b/LibGit2Sharp/Diff.cs @@ -53,6 +53,10 @@ namespace LibGit2Sharp { options.Flags |= GitDiffOptionFlags.GIT_DIFF_PATIENCE; } + else if (compareOptions.Algorithm == DiffAlgorithm.Minimal) + { + options.Flags |= GitDiffOptionFlags.GIT_DIFF_MINIMAL; + } if (diffOptions.HasFlag(DiffModifiers.DisablePathspecMatch)) { diff --git a/LibGit2Sharp/DiffAlgorithm.cs b/LibGit2Sharp/DiffAlgorithm.cs index 9e89e68e..17f17336 100644 --- a/LibGit2Sharp/DiffAlgorithm.cs +++ b/LibGit2Sharp/DiffAlgorithm.cs @@ -11,6 +11,11 @@ namespace LibGit2Sharp Meyers = 0, /// <summary> + /// Use "minimal diff" algorithm when generating patches. + /// </summary> + Minimal = 1, + + /// <summary> /// Use "patience diff" algorithm when generating patches. /// </summary> Patience = 2, |