summaryrefslogtreecommitdiff
path: root/tests-clar/diff/iterator.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-01-08 15:53:13 -0800
committerRussell Belfer <rb@github.com>2013-01-15 09:51:34 -0800
commit134d8c918c3430b19b75f45b1e490ce2aae526ff (patch)
tree73c79fc8d49d494c49e2fe034f3e30d167f7326e /tests-clar/diff/iterator.c
parent5c8bb98ce9c4e5bb6527c8ffc274c8b3e0755fa7 (diff)
downloadlibgit2-134d8c918c3430b19b75f45b1e490ce2aae526ff.tar.gz
Update iterator API with flags for ignore_case
This changes the iterator API so that flags can be passed in to the constructor functions to control the ignore_case behavior. At this point, the flags are not supported on tree iterators (i.e. there is no functional change over the old API), but the API changes are all made to accomodate this. By the way, I went with a flags parameter because in the future I have a couple of other ideas for iterator flags that will make it easier to fix some diff/status/checkout bugs.
Diffstat (limited to 'tests-clar/diff/iterator.c')
-rw-r--r--tests-clar/diff/iterator.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests-clar/diff/iterator.c b/tests-clar/diff/iterator.c
index de083ea36..6fc5730bc 100644
--- a/tests-clar/diff/iterator.c
+++ b/tests-clar/diff/iterator.c
@@ -35,7 +35,8 @@ static void tree_iterator_test(
git_repository *repo = cl_git_sandbox_init(sandbox);
cl_assert(t = resolve_commit_oid_to_tree(repo, treeish));
- cl_git_pass(git_iterator_for_tree_range(&i, t, start, end));
+ cl_git_pass(git_iterator_for_tree_range(
+ &i, t, GIT_ITERATOR_DONT_IGNORE_CASE, start, end));
/* test loop */
cl_git_pass(git_iterator_current(i, &entry));
@@ -304,7 +305,8 @@ void test_diff_iterator__tree_special_functions(void)
repo, "24fa9a9fc4e202313e24b648087495441dab432b");
cl_assert(t != NULL);
- cl_git_pass(git_iterator_for_tree_range(&i, t, NULL, NULL));
+ cl_git_pass(git_iterator_for_tree_range(
+ &i, t, GIT_ITERATOR_DONT_IGNORE_CASE, NULL, NULL));
cl_git_pass(git_iterator_current(i, &entry));
while (entry != NULL) {
@@ -362,7 +364,7 @@ static void index_iterator_test(
git_repository *repo = cl_git_sandbox_init(sandbox);
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_for_index_range(&i, index, 0, start, end));
cl_git_pass(git_iterator_current(i, &entry));
while (entry != NULL) {
@@ -536,7 +538,7 @@ static void workdir_iterator_test(
int count = 0, count_all = 0, count_all_post_reset = 0;
git_repository *repo = cl_git_sandbox_init(sandbox);
- cl_git_pass(git_iterator_for_workdir_range(&i, repo, start, end));
+ cl_git_pass(git_iterator_for_workdir_range(&i, repo, 0, start, end));
cl_git_pass(git_iterator_current(i, &entry));
while (entry != NULL) {
@@ -734,7 +736,7 @@ void test_diff_iterator__workdir_builtin_ignores(void)
cl_git_mkfile("attr/sub/.git", "whatever");
cl_git_pass(
- git_iterator_for_workdir_range(&i, repo, "dir", "sub/sub/file"));
+ git_iterator_for_workdir_range(&i, repo, 0, "dir", "sub/sub/file"));
cl_git_pass(git_iterator_current(i, &entry));
for (idx = 0; entry != NULL; ++idx) {