diff options
author | Russell Belfer <rb@github.com> | 2013-01-08 13:39:15 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-01-15 09:49:32 -0800 |
commit | 4b181037553601a0747ad39ccdd85ebd3b184055 (patch) | |
tree | 1f4bb97ad79bd9f86337d372317e68f862fa1b3c /tests-clar/diff/iterator.c | |
parent | facc0650b12655c9637732bb992d1053cd946057 (diff) | |
download | libgit2-4b181037553601a0747ad39ccdd85ebd3b184055.tar.gz |
Minor iterator API cleanups
In preparation for further iterator changes, this cleans up a few
small things in the iterator API:
* removed the git_iterator_for_repo_index_range API
* made git_iterator_free not be inlined
* minor param name and test function name tweaks
Diffstat (limited to 'tests-clar/diff/iterator.c')
-rw-r--r-- | tests-clar/diff/iterator.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests-clar/diff/iterator.c b/tests-clar/diff/iterator.c index b5790632d..de083ea36 100644 --- a/tests-clar/diff/iterator.c +++ b/tests-clar/diff/iterator.c @@ -355,12 +355,14 @@ static void index_iterator_test( const char **expected_names, const char **expected_oids) { + git_index *index; git_iterator *i; const git_index_entry *entry; int count = 0; git_repository *repo = cl_git_sandbox_init(sandbox); - cl_git_pass(git_iterator_for_repo_index_range(&i, repo, start, end)); + cl_git_pass(git_repository_index(&index, repo)); + cl_git_pass(git_iterator_for_index_range(&i, index, start, end)); cl_git_pass(git_iterator_current(i, &entry)); while (entry != NULL) { @@ -378,6 +380,7 @@ static void index_iterator_test( } git_iterator_free(i); + git_index_free(index); cl_assert_equal_i(expected_count, count); } |