summaryrefslogtreecommitdiff
path: root/tests-clar/diff/index.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/index.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/index.c')
-rw-r--r--tests-clar/diff/index.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests-clar/diff/index.c b/tests-clar/diff/index.c
index e89260217..9591e3457 100644
--- a/tests-clar/diff/index.c
+++ b/tests-clar/diff/index.c
@@ -35,7 +35,7 @@ void test_diff_index__0(void)
cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts));
cl_git_pass(git_diff_foreach(
- diff, &exp, diff_file_cb, diff_hunk_cb, diff_line_cb));
+ diff, diff_file_cb, diff_hunk_cb, diff_line_cb, &exp));
/* to generate these values:
* - cd to tests/resources/status,
@@ -63,7 +63,7 @@ void test_diff_index__0(void)
cl_git_pass(git_diff_index_to_tree(&diff, g_repo, b, NULL, &opts));
cl_git_pass(git_diff_foreach(
- diff, &exp, diff_file_cb, diff_hunk_cb, diff_line_cb));
+ diff, diff_file_cb, diff_hunk_cb, diff_line_cb, &exp));
/* to generate these values:
* - cd to tests/resources/status,
@@ -92,11 +92,11 @@ void test_diff_index__0(void)
}
static int diff_stop_after_2_files(
- void *cb_data,
const git_diff_delta *delta,
- float progress)
+ float progress,
+ void *payload)
{
- diff_expects *e = cb_data;
+ diff_expects *e = payload;
GIT_UNUSED(progress);
GIT_UNUSED(delta);
@@ -129,7 +129,7 @@ void test_diff_index__1(void)
cl_assert_equal_i(
GIT_EUSER,
- git_diff_foreach(diff, &exp, diff_stop_after_2_files, NULL, NULL)
+ git_diff_foreach(diff, diff_stop_after_2_files, NULL, NULL, &exp)
);
cl_assert_equal_i(2, exp.files);