summaryrefslogtreecommitdiff
path: root/include/git2/notes.h
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@fastmail.co.uk>2017-03-19 18:34:07 +0000
committerRichard Ipsum <richardipsum@fastmail.co.uk>2017-10-07 00:43:40 +0100
commit60bee89d4697832f88c484f0c236e7f25c3d62fe (patch)
tree9670114f2cd4510c1c195c2281a04c4d1aaeee95 /include/git2/notes.h
parent9a02725d11acb302b0d9ef7013ae81ffd59525c7 (diff)
downloadlibgit2-60bee89d4697832f88c484f0c236e7f25c3d62fe.tar.gz
notes: Add git_note_commit_iterator_new
This also adds tests for this function.
Diffstat (limited to 'include/git2/notes.h')
-rw-r--r--include/git2/notes.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/notes.h b/include/git2/notes.h
index f3cde4ebf..853e5de59 100644
--- a/include/git2/notes.h
+++ b/include/git2/notes.h
@@ -52,6 +52,20 @@ GIT_EXTERN(int) git_note_iterator_new(
const char *notes_ref);
/**
+ * Creates a new iterator for notes from a commit
+ *
+ * The iterator must be freed manually by the user.
+ *
+ * @param out pointer to the iterator
+ * @param notes_commit a pointer to the notes commit object
+ *
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_note_commit_iterator_new(
+ git_note_iterator **out,
+ git_commit *notes_commit);
+
+/**
* Frees an git_note_iterator
*
* @param it pointer to the iterator