From 8147b1aff56c0f36f6afee9b8810fc74776e1f58 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Mon, 25 May 2015 20:03:59 -0400 Subject: 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. --- tests/diff/diff_helpers.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/diff/diff_helpers.c') 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) -- cgit v1.2.1