From 5de4ec810492178095897f726bfaf879994aaf11 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 21 Oct 2013 15:36:38 -0700 Subject: Implement patience and minimal diff flags It seems that to implement these options, we just have to pass the appropriate flags through to the libxdiff code taken from core git. So let's do it (and add a test). --- src/diff_xdiff.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/diff_xdiff.c') diff --git a/src/diff_xdiff.c b/src/diff_xdiff.c index d07a33221..2aca76f87 100644 --- a/src/diff_xdiff.c +++ b/src/diff_xdiff.c @@ -222,6 +222,11 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts) if (flags & GIT_DIFF_IGNORE_WHITESPACE_EOL) xo->params.flags |= XDF_IGNORE_WHITESPACE_AT_EOL; + if (flags & GIT_DIFF_PATIENCE) + xo->params.flags |= XDF_PATIENCE_DIFF; + if (flags & GIT_DIFF_MINIMAL) + xo->params.flags |= XDF_NEED_MINIMAL; + memset(&xo->callback, 0, sizeof(xo->callback)); xo->callback.outf = git_xdiff_cb; } -- cgit v1.2.1