summaryrefslogtreecommitdiff
path: root/src/diff_xdiff.c
diff options
context:
space:
mode:
authoryuuri <houjie95@foxmail.com>2021-05-01 20:26:49 +0800
committeryuuri <houjie95@foxmail.com>2021-05-01 20:26:49 +0800
commited94f54940fed8c7e9882c222b4791140bc209ba (patch)
tree3fe88d72819ce79ac0a20193e4ca9aced9ec74e8 /src/diff_xdiff.c
parentcabfa3b30cfae24ec6d7d75c5cf052e052cbf131 (diff)
downloadlibgit2-ed94f54940fed8c7e9882c222b4791140bc209ba.tar.gz
diff:add option to ignore blank line changes
Diffstat (limited to 'src/diff_xdiff.c')
-rw-r--r--src/diff_xdiff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/diff_xdiff.c b/src/diff_xdiff.c
index c4668fa2f..7a32ea43f 100644
--- a/src/diff_xdiff.c
+++ b/src/diff_xdiff.c
@@ -259,5 +259,8 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts)
if (flags & GIT_DIFF_MINIMAL)
xo->params.flags |= XDF_NEED_MINIMAL;
+ if (flags & GIT_DIFF_IGNORE_BLANK_LINES)
+ xo->params.flags |= XDF_IGNORE_BLANK_LINES;
+
xo->callback.outf = git_xdiff_cb;
}