summaryrefslogtreecommitdiff
path: root/tests-clar/diff/patch.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-11-20 16:36:06 -0800
committerBen Straub <bs@github.com>2012-11-27 13:18:28 -0800
commit793c4385597d0786242e17c8ef37cdfa83f1865c (patch)
tree22e9b48db487577d865a174bc5b21a13a176c78f /tests-clar/diff/patch.c
parent54b2a37ac7715c74e5b06b76eb2b631987d7b6f8 (diff)
downloadlibgit2-793c4385597d0786242e17c8ef37cdfa83f1865c.tar.gz
Update diff callback param order
This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
Diffstat (limited to 'tests-clar/diff/patch.c')
-rw-r--r--tests-clar/diff/patch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests-clar/diff/patch.c b/tests-clar/diff/patch.c
index 6aaf7651f..16ed2551b 100644
--- a/tests-clar/diff/patch.c
+++ b/tests-clar/diff/patch.c
@@ -22,14 +22,14 @@ void test_diff_patch__cleanup(void)
#define EXPECTED_HUNK "@@ -1,2 +0,0 @@\n"
static int check_removal_cb(
- void *cb_data,
const git_diff_delta *delta,
const git_diff_range *range,
char line_origin,
const char *formatted_output,
- size_t output_len)
+ size_t output_len,
+ void *payload)
{
- GIT_UNUSED(cb_data);
+ GIT_UNUSED(payload);
GIT_UNUSED(output_len);
switch (line_origin) {
@@ -90,7 +90,7 @@ void test_diff_patch__can_properly_display_the_removal_of_a_file(void)
cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, one, another, NULL));
- cl_git_pass(git_diff_print_patch(diff, NULL, check_removal_cb));
+ cl_git_pass(git_diff_print_patch(diff, check_removal_cb, NULL));
git_diff_list_free(diff);