summaryrefslogtreecommitdiff
path: root/src/notes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notes.c')
-rw-r--r--src/notes.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/notes.c b/src/notes.c
index 9aef8fcac..68486c9d6 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -766,6 +766,25 @@ cleanup:
return error;
}
+int git_note_commit_iterator_new(
+ git_note_iterator **it,
+ git_commit *notes_commit)
+{
+ int error;
+ git_tree *tree;
+
+ if ((error = git_commit_tree(&tree, notes_commit)) < 0)
+ goto cleanup;
+
+ if ((error = git_iterator_for_tree(it, tree, NULL)) < 0)
+ git_iterator_free(*it);
+
+cleanup:
+ git_tree_free(tree);
+
+ return error;
+}
+
int git_note_next(
git_oid* note_id,
git_oid* annotated_id,