diff options
author | Russell Belfer <rb@github.com> | 2012-11-20 16:36:06 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-11-27 13:18:28 -0800 |
commit | 793c4385597d0786242e17c8ef37cdfa83f1865c (patch) | |
tree | 22e9b48db487577d865a174bc5b21a13a176c78f /tests-clar/diff/tree.c | |
parent | 54b2a37ac7715c74e5b06b76eb2b631987d7b6f8 (diff) | |
download | libgit2-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/tree.c')
-rw-r--r-- | tests-clar/diff/tree.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests-clar/diff/tree.c b/tests-clar/diff/tree.c index 6eb5826e4..58dc4e6fa 100644 --- a/tests-clar/diff/tree.c +++ b/tests-clar/diff/tree.c @@ -37,7 +37,7 @@ void test_diff_tree__0(void) cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, &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)); cl_assert_equal_i(5, exp.files); cl_assert_equal_i(2, exp.file_status[GIT_DELTA_ADDED]); @@ -59,7 +59,7 @@ void test_diff_tree__0(void) cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, c, b, &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)); cl_assert_equal_i(2, exp.files); cl_assert_equal_i(0, exp.file_status[GIT_DELTA_ADDED]); @@ -148,7 +148,7 @@ void test_diff_tree__options(void) cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, c, d, &opts)); cl_git_pass(git_diff_foreach( - diff, &actual, diff_file_cb, diff_hunk_cb, diff_line_cb)); + diff, diff_file_cb, diff_hunk_cb, diff_line_cb, &actual)); expected = &test_expects[i]; cl_assert_equal_i(actual.files, expected->files); @@ -192,7 +192,7 @@ void test_diff_tree__bare(void) cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, &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)); cl_assert_equal_i(3, exp.files); cl_assert_equal_i(2, exp.file_status[GIT_DELTA_ADDED]); @@ -242,7 +242,7 @@ void test_diff_tree__merge(void) memset(&exp, 0, sizeof(exp)); cl_git_pass(git_diff_foreach( - diff1, &exp, diff_file_cb, diff_hunk_cb, diff_line_cb)); + diff1, diff_file_cb, diff_hunk_cb, diff_line_cb, &exp)); cl_assert_equal_i(6, exp.files); cl_assert_equal_i(2, exp.file_status[GIT_DELTA_ADDED]); |