diff options
author | Russell Belfer <rb@github.com> | 2012-11-13 13:58:29 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-11-14 22:54:31 -0800 |
commit | 5735bf5e6ab4da347b601d4b85c09c5c701dc002 (patch) | |
tree | a6a33b5234bba3ba293af13c91e435213a4223c5 /tests-clar/diff/tree.c | |
parent | 5a36f127808c7b470eef17b1a8a130dde0cc64a1 (diff) | |
download | libgit2-5735bf5e6ab4da347b601d4b85c09c5c701dc002.tar.gz |
Fix diff API to better parameter order
The diff API is not in the parameter order one would expect from
other libgit2 APIs. This fixes that.
Diffstat (limited to 'tests-clar/diff/tree.c')
-rw-r--r-- | tests-clar/diff/tree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests-clar/diff/tree.c b/tests-clar/diff/tree.c index f8b9a71a5..8e8939976 100644 --- a/tests-clar/diff/tree.c +++ b/tests-clar/diff/tree.c @@ -34,7 +34,7 @@ void test_diff_tree__0(void) memset(&exp, 0, sizeof(exp)); - cl_git_pass(git_diff_tree_to_tree(g_repo, &opts, a, b, &diff)); + cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, &opts)); cl_git_pass(git_diff_foreach( diff, &exp, diff_file_fn, diff_hunk_fn, diff_line_fn)); @@ -56,7 +56,7 @@ void test_diff_tree__0(void) memset(&exp, 0, sizeof(exp)); - cl_git_pass(git_diff_tree_to_tree(g_repo, &opts, c, b, &diff)); + cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, c, b, &opts)); cl_git_pass(git_diff_foreach( diff, &exp, diff_file_fn, diff_hunk_fn, diff_line_fn)); @@ -141,9 +141,9 @@ void test_diff_tree__options(void) opts = test_options[i]; if (test_ab_or_cd[i] == 0) - cl_git_pass(git_diff_tree_to_tree(g_repo, &opts, a, b, &diff)); + cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, &opts)); else - cl_git_pass(git_diff_tree_to_tree(g_repo, &opts, c, d, &diff)); + cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, c, d, &opts)); cl_git_pass(git_diff_foreach( diff, &actual, diff_file_fn, diff_hunk_fn, diff_line_fn)); @@ -187,7 +187,7 @@ void test_diff_tree__bare(void) memset(&exp, 0, sizeof(exp)); - cl_git_pass(git_diff_tree_to_tree(g_repo, &opts, a, b, &diff)); + cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, &opts)); cl_git_pass(git_diff_foreach( diff, &exp, diff_file_fn, diff_hunk_fn, diff_line_fn)); @@ -225,9 +225,9 @@ void test_diff_tree__merge(void) cl_assert((b = resolve_commit_oid_to_tree(g_repo, b_commit)) != NULL); cl_assert((c = resolve_commit_oid_to_tree(g_repo, c_commit)) != NULL); - cl_git_pass(git_diff_tree_to_tree(g_repo, NULL, a, b, &diff1)); + cl_git_pass(git_diff_tree_to_tree(&diff1, g_repo, a, b, NULL)); - cl_git_pass(git_diff_tree_to_tree(g_repo, NULL, c, b, &diff2)); + cl_git_pass(git_diff_tree_to_tree(&diff2, g_repo, c, b, NULL)); git_tree_free(a); git_tree_free(b); @@ -279,7 +279,7 @@ void test_diff_tree__larger_hunks(void) opts.context_lines = 1; opts.interhunk_lines = 0; - cl_git_pass(git_diff_tree_to_tree(g_repo, &opts, a, b, &diff)); + cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, &opts)); num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { |