diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-05-25 20:03:59 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-06-12 09:39:20 -0400 |
commit | 8147b1aff56c0f36f6afee9b8810fc74776e1f58 (patch) | |
tree | 298396fb80a973b990e21084e29b0466ceafe5ed /tests/diff/diff_helpers.c | |
parent | ac7012a81f0bdc472a3d22393291eb7d130705d1 (diff) | |
download | libgit2-8147b1aff56c0f36f6afee9b8810fc74776e1f58.tar.gz |
diff: introduce binary diff callbacks
Introduce a new binary diff callback to provide the actual binary
delta contents to callers. Create this data from the diff contents
(instead of directly from the ODB) to support binary diffs including
the workdir, not just things coming out of the ODB.
Diffstat (limited to 'tests/diff/diff_helpers.c')
-rw-r--r-- | tests/diff/diff_helpers.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/diff/diff_helpers.c b/tests/diff/diff_helpers.c index 03862d6b4..c7352571c 100644 --- a/tests/diff/diff_helpers.c +++ b/tests/diff/diff_helpers.c @@ -91,6 +91,18 @@ int diff_print_file_cb( return diff_file_cb(delta, progress, payload); } +int diff_binary_cb( + const git_diff_delta *delta, + const git_diff_binary *binary, + void *payload) +{ + GIT_UNUSED(delta); + GIT_UNUSED(binary); + GIT_UNUSED(payload); + + return 0; +} + int diff_hunk_cb( const git_diff_delta *delta, const git_diff_hunk *hunk, @@ -145,6 +157,7 @@ int diff_line_cb( int diff_foreach_via_iterator( git_diff *diff, git_diff_file_cb file_cb, + git_diff_binary_cb binary_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *data) |