summaryrefslogtreecommitdiff
path: root/src/notes.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-03-05 16:10:05 -0800
committerRussell Belfer <rb@github.com>2013-03-06 16:52:01 -0800
commit169dc61607b69726c6012ab70758692637928a85 (patch)
tree01593b00741391d9c9d6aad6344aed4cbc8ef6a4 /src/notes.c
parented4f95e5d9f2f59dc5d5a4b76a696b0595b6175d (diff)
downloadlibgit2-169dc61607b69726c6012ab70758692637928a85.tar.gz
Make iterator APIs consistent with standards
The iterator APIs are not currently consistent with the parameter ordering of the rest of the codebase. This rearranges the order of parameters, simplifies the naming of a number of functions, and makes somewhat better use of macros internally to clean up the iterator code. This also expands the test coverage of iterator functionality, making sure that case sensitive range-limited iteration works correctly.
Diffstat (limited to 'src/notes.c')
-rw-r--r--src/notes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/notes.c b/src/notes.c
index a1a47d989..ef48ac88e 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -625,7 +625,7 @@ int git_note_iterator_new(
if (error < 0)
goto cleanup;
- if ((error = git_iterator_for_tree(it, tree)) < 0)
+ if ((error = git_iterator_for_tree(it, tree, 0, NULL, NULL)) < 0)
git_iterator_free(*it);
cleanup:
@@ -643,7 +643,7 @@ int git_note_next(
int error;
const git_index_entry *item;
- if ((error = git_iterator_current(it, &item)) < 0)
+ if ((error = git_iterator_current(&item, it)) < 0)
goto exit;
if (item != NULL) {
@@ -651,7 +651,7 @@ int git_note_next(
error = process_entry_path(item->path, annotated_id);
if (error >= 0)
- error = git_iterator_advance(it, NULL);
+ error = git_iterator_advance(NULL, it);
} else {
error = GIT_ITEROVER;
}