summaryrefslogtreecommitdiff
path: root/src/diff_xdiff.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2017-10-29 15:05:28 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2017-11-19 08:20:18 +0100
commit7e3faf58cbafd1115d0f4bf6e5a2b422f9ef78f1 (patch)
tree378c52d782e0caa42a44f4f60b8e7d1ec4427c16 /src/diff_xdiff.c
parenta8f19f819ea5b9a949b439702893f87c2c655141 (diff)
downloadlibgit2-7e3faf58cbafd1115d0f4bf6e5a2b422f9ef78f1.tar.gz
diff: expose the "indent heuristic" in the diff options
We default to off, but we might want to consider changing `GIT_DIFF_NORMAL` to include it.
Diffstat (limited to 'src/diff_xdiff.c')
-rw-r--r--src/diff_xdiff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/diff_xdiff.c b/src/diff_xdiff.c
index 5e10db13d..701eb1b5f 100644
--- a/src/diff_xdiff.c
+++ b/src/diff_xdiff.c
@@ -239,6 +239,8 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts)
xo->params.flags |= XDF_IGNORE_WHITESPACE_CHANGE;
if (flags & GIT_DIFF_IGNORE_WHITESPACE_EOL)
xo->params.flags |= XDF_IGNORE_WHITESPACE_AT_EOL;
+ if (flags & GIT_DIFF_INDENT_HEURISTIC)
+ xo->params.flags |= XDF_INDENT_HEURISTIC;
if (flags & GIT_DIFF_PATIENCE)
xo->params.flags |= XDF_PATIENCE_DIFF;