diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-07-28 11:41:27 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2015-08-28 18:39:47 -0400 |
| commit | ed1c64464a4e3126eef5d74d2c14c19133fa9cd8 (patch) | |
| tree | 8105397838d42450ae6bd38efe4479cf377eee7b /tests/merge | |
| parent | 126932eb0b3986784915acb4fab8f4137d162651 (diff) | |
| download | libgit2-ed1c64464a4e3126eef5d74d2c14c19133fa9cd8.tar.gz | |
iterator: use an options struct instead of args
Diffstat (limited to 'tests/merge')
| -rw-r--r-- | tests/merge/trees/treediff.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/merge/trees/treediff.c b/tests/merge/trees/treediff.c index b96c4c4db..f21d99b6d 100644 --- a/tests/merge/trees/treediff.c +++ b/tests/merge/trees/treediff.c @@ -44,6 +44,7 @@ static void test_find_differences( git_oid ancestor_oid, ours_oid, theirs_oid; git_tree *ancestor_tree, *ours_tree, *theirs_tree; git_iterator *ancestor_iter, *ours_iter, *theirs_iter; + git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT; git_merge_options opts = GIT_MERGE_OPTIONS_INIT; opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES; @@ -67,12 +68,11 @@ static void test_find_differences( cl_git_pass(git_tree_lookup(&ours_tree, repo, &ours_oid)); cl_git_pass(git_tree_lookup(&theirs_tree, repo, &theirs_oid)); - cl_git_pass(git_iterator_for_tree(&ancestor_iter, ancestor_tree, - GIT_ITERATOR_DONT_IGNORE_CASE, NULL, NULL)); - cl_git_pass(git_iterator_for_tree(&ours_iter, ours_tree, - GIT_ITERATOR_DONT_IGNORE_CASE, NULL, NULL)); - cl_git_pass(git_iterator_for_tree(&theirs_iter, theirs_tree, - GIT_ITERATOR_DONT_IGNORE_CASE, NULL, NULL)); + iter_opts.flags = GIT_ITERATOR_DONT_IGNORE_CASE; + + cl_git_pass(git_iterator_for_tree(&ancestor_iter, ancestor_tree, &iter_opts)); + cl_git_pass(git_iterator_for_tree(&ours_iter, ours_tree, &iter_opts)); + cl_git_pass(git_iterator_for_tree(&theirs_iter, theirs_tree, &iter_opts)); cl_git_pass(git_merge_diff_list__find_differences(merge_diff_list, ancestor_iter, ours_iter, theirs_iter)); cl_git_pass(git_merge_diff_list__find_renames(repo, merge_diff_list, &opts)); |
