diff options
author | Russell Belfer <rb@github.com> | 2013-06-11 11:22:22 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-06-11 11:22:22 -0700 |
commit | 5dc98298a14a9adae3cf8b21fb01f682791c29c7 (patch) | |
tree | ed0e5ab97a3e7d6d03b9959265693665f950cef6 /src/diff_patch.c | |
parent | 3eadfecd325d355d3f8a9631d9c89b7e8eede98b (diff) | |
download | libgit2-5dc98298a14a9adae3cf8b21fb01f682791c29c7.tar.gz |
Implement regex pattern diff driver
This implements the loading of regular expression pattern lists
for diff drivers that search for function context in that way.
This also changes the way that diff drivers update options and
interface with xdiff APIs to make them a little more flexible.
Diffstat (limited to 'src/diff_patch.c')
-rw-r--r-- | src/diff_patch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/diff_patch.c b/src/diff_patch.c index d7eb69db6..fe22d678c 100644 --- a/src/diff_patch.c +++ b/src/diff_patch.c @@ -96,8 +96,7 @@ static int diff_patch_load(git_diff_patch *patch, git_diff_output *output) /* if no hunk and data callbacks and user doesn't care if data looks * binary, then there is no need to actually load the data */ - if (patch->ofile.opts && - (patch->ofile.opts->flags & GIT_DIFF_SKIP_BINARY_CHECK) != 0 && + if ((patch->ofile.opts_flags & GIT_DIFF_SKIP_BINARY_CHECK) != 0 && output && !output->hunk_cb && !output->data_cb) return 0; @@ -718,6 +717,6 @@ static void diff_output_init( static void diff_output_to_patch(git_diff_output *out, git_diff_patch *patch) { diff_output_init( - out, patch->ofile.opts, + out, NULL, diff_patch_file_cb, diff_patch_hunk_cb, diff_patch_line_cb, patch); } |