diff options
author | Russell Belfer <rb@github.com> | 2013-10-21 15:36:38 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-10-21 15:36:38 -0700 |
commit | 5de4ec810492178095897f726bfaf879994aaf11 (patch) | |
tree | 266f521ca7fc71f871794d27ec9cc7ea5b1f122d /src/diff_xdiff.c | |
parent | 623460ab139bbb0360f51b26ac27fb6932569278 (diff) | |
download | libgit2-5de4ec810492178095897f726bfaf879994aaf11.tar.gz |
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).
Diffstat (limited to 'src/diff_xdiff.c')
-rw-r--r-- | src/diff_xdiff.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |